Add Scroll #375
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: Deploy to PROD - academy.subquery.network | |
on: | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
# choose node.js version to use | |
node-version: 16 | |
- run: npm install -g yarn | |
- run: yarn install | |
- run: yarn docs:build | |
- uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ap-northeast-1 | |
- run: aws s3 sync ./docs/.vuepress/dist s3://doc.subquery.network/ --delete | |
- name: Invalidate CloudFront | |
uses: chetan/invalidate-cloudfront-action@v2 | |
env: | |
DISTRIBUTION: ${{ secrets.CF_DISTRIBUTION }} | |
PATHS: "/*" | |
AWS_REGION: "us-east-1" | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |