fix #6 when build-decision fails, build continues (#22) #4
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 Designer Decisions (Production) | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'packages/libs/**' | |
- 'docs/designer-decisions/**' | |
workflow_dispatch: | |
jobs: | |
deploy-production: | |
runs-on: ubuntu-latest | |
environment: | |
name: production | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20.10.0' | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@v1 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_DEPLOY_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_DEPLOY_KEY_SECRET }} | |
aws-region: ${{ vars.AWS_DEFAULT_REGION }} | |
- name: Install root dependencies | |
run: npm ci | |
- name: Build root project | |
run: npm run ci | |
- name: Build root project | |
run: npm run ci | |
- name: Build application | |
run: npm run pre-deploy:production --prefix docs/designer-decisions/ | |
- name: Deploy to S3 | |
run: aws s3 sync --delete ./docs/designer-decisions/dist/ s3://${{ vars.BUCKET_NAME }} | |
- name: Create CloudFront invalidation | |
run: aws cloudfront create-invalidation --distribution-id ${{ vars.DISTRIBUTION_ID }} --paths "/*" |