Skip to content

Publish Docs

Publish Docs #43

Workflow file for this run

name: Publish Docs
on:
workflow_dispatch:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
id-token: write
contents: write
jobs:
publish:
name: Publish Docs
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.GIT_TOKEN }}
- uses: actions/setup-go@v1
with:
go-version: "1.19.4"
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Setup
run: make all
env:
NODE_OPTIONS: "--max-old-space-size=8192"
- name: Configure Shared Services AWS Credentials
uses: aws-actions/configure-aws-credentials@v3
with:
role-to-assume: ${{ secrets.AWS_SHARED_SERVICES_IAM_ROLE }}
role-session-name: wave-shared
aws-region: ${{ secrets.AWS_WEST_REGION }}
- name: Publish Docs
run: |
make website
make publish-website
aws cloudfront create-invalidation --distribution-id $AWS_CLOUDFRONT_DISTRIBUTION_ID --paths "/*"
env:
AWS_CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }}
# Needs a sleep to wait for cloudfront cache bust.
- name: Reindex Algolia search
run: |
sleep 50s
curl -X POST -H "Content-Type: application/json" --user $ALGOLIA_CRAWLER_USER_ID:$ALGOLIA_CRAWLER_API_KEY https://crawler.algolia.com/api/1/crawlers/$ALGOLIA_CRAWLER_ID/reindex
env:
ALGOLIA_CRAWLER_API_KEY: ${{ secrets.ALGOLIA_CRAWLER_API_KEY }}
ALGOLIA_CRAWLER_ID: ${{ secrets.ALGOLIA_CRAWLER_ID }}
ALGOLIA_CRAWLER_USER_ID: ${{ secrets.ALGOLIA_CRAWLER_USER_ID }}