Deploy API Docs #1442
Workflow file for this run
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: Upload docs to production | |
on: | |
schedule: | |
# UTC timezone | |
- cron: '0 6 * * *' | |
workflow_dispatch: | |
jobs: | |
upload: | |
name: Upload docs to production | |
runs-on: ubuntu-20.04 | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Configure AWS Credentials | |
id: creds | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-region: us-east-1 | |
role-to-assume: arn:aws:iam::200670743174:role/github-oidc-deployment-gz-web-app | |
# Need to run ./build_docs.sh | |
output-credentials: true | |
- name: Describe permissions | |
run: | | |
aws sts get-caller-identity | |
- name: Run nightly upload | |
run: | | |
[[ -z "${AWS_ACCESS_KEY_ID}" ]] && echo "key_id defined" | |
[[ -z "${AWS_SECRET_ACCESS_KEY}" ]] && echo "secret_key defined" | |
cd tools && ./build_docs.sh all | |
shell: bash | |
env: | |
GZ_VERSION_PASSWORD: ${{ secrets.GZ_VERSION_PASSWORD }} | |
AWS_ACCESS_KEY_ID: ${{ steps.creds.outputs.aws-access-key-id }} | |
AWS_SECRET_ACCESS_KEY: ${{ steps.creds.outputs.aws-secret-access-key }} | |
- name: Invalidate Cloudfront distribution | |
run: | | |
aws cloudfront create-invalidation --distribution-id ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} --paths '/*' --region us-east-1 |