Bump pug from 3.0.2 to 3.0.3 in /web (#35) #30
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: CI/CD | |
on: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '18' | |
- name: Running npm install and installing gulp | |
run: | | |
cd web | |
npm install | |
- name: Running build | |
run: | | |
cd web | |
npm run build | |
check-secret: | |
runs-on: ubuntu-latest | |
outputs: | |
deploy-secrets: ${{ steps.deploy-secrets.outputs.defined }} | |
steps: | |
- id: deploy-secrets | |
if: "${{ env.DEPLOY_SECRETS != '' }}" | |
run: echo "::set-output name=defined::true" | |
env: | |
MY_KEY: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
deploy: | |
needs: check-secret | |
runs-on: ubuntu-latest | |
if: needs.check-secret.outputs.deploy-secrets == 'true' | |
steps: | |
- name: S3 Sync | |
uses: jakejarvis/[email protected] | |
with: | |
args: --delete --exclude 'scss/*' --exclude 'node_modules/*' --exclude package.json --exclude package-lock.json --exclude requirements.txt --exclude gulpfile.js | |
env: | |
AWS_S3_BUCKET: <s3-bucket> | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: <region> | |
SOURCE_DIR: web/dist | |
- name: Invalidate Cloudfront | |
uses: chetan/[email protected] | |
env: | |
DISTRIBUTION: <cloudfront-dist-id> | |
PATHS: '/*' | |
AWS_REGION: <region> | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |