feat(self-managed): aws opensearch doc #22675
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build-docs | |
on: pull_request | |
jobs: | |
build-docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: Install Dependencies | |
run: npm ci | |
- name: Cache Docusaurus | |
uses: ./.github/actions/docusaurus-cache | |
- name: Build | |
run: npm run build | |
env: | |
NODE_OPTIONS: --max_old_space_size=8192 | |
- name: Remove https redirect | |
run: | | |
sed -i '/SERVER_PORT/d;/SERVER_NAME/d' build/.htaccess | |
- name: Run web server | |
run: | | |
docker run -d --name webserver -v "$PWD/build":/app -p 8888:8080 bitnami/apache:2.4.54 | |
echo "container_ip=$(docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' webserver)" >> $GITHUB_ENV | |
- name: Download sitemap from production | |
run: curl -sL https://docs.camunda.io/sitemap.xml | grep -oP '<loc>\K.*?(?=</loc>)' | sed "s!https://docs.camunda.io!http://${{ env.container_ip }}:8080!g" > sitemap.prod.txt | |
- name: Prepare product links | |
run: grep 'https://docs.camunda.io' product-links.txt | sed "s!https://docs.camunda.io!http://${{ env.container_ip }}:8080!g" > product-links.prod.txt | |
- name: Waiting for URL available | |
uses: nev7n/wait_for_response@v1 | |
with: | |
url: "http://${{ env.container_ip }}:8080/" | |
- name: Validate sitemap links | |
uses: lycheeverse/lychee-action@v1.6.1 | |
with: | |
args: "sitemap.prod.txt" | |
fail: true | |
- name: Validate product links | |
uses: lycheeverse/lychee-action@v1.6.1 | |
with: | |
args: "product-links.prod.txt" | |
fail: true | |
- name: Check internal links | |
uses: untitaker/hyperlink@0.1.27 | |
with: | |
args: build/ |