fix: fix docs release #109
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 documentation | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@master | |
- name: Cache node modules | |
uses: actions/cache@v1 | |
with: | |
path: node_modules | |
key: ${{ runner.OS }}-build-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.OS }}-build- | |
${{ runner.OS }}- | |
- name: Install | |
run: | | |
cd packages/docs | |
npm install | |
- name: Build | |
run: | | |
cd packages/docs | |
npm run build | |
- name: Deploy | |
env: | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_CLOUDFRONT_ID: ${{ secrets.DOCS_CLOUDFRONT_ID }} | |
AWS_DEFAULT_REGION: us-east-1 | |
AWS_DEFAULT_OUTPUT: json | |
run: | | |
aws s3 sync packages/docs/.vuepress/dist s3://mookme-documentation --delete | |
aws cloudfront create-invalidation --distribution-id $AWS_CLOUDFRONT_ID --paths "/*" |