Pin 6008 aggiornamento configurazione eslint (#84) #11
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: "Dev CI/CD" | |
on: | |
push: | |
branches: | |
- "develop" | |
paths: | |
- "packages/probing-frontend/**" | |
jobs: | |
deploy_dev: | |
name: Build and deploy frontend in development environment | |
runs-on: ubuntu-latest | |
environment: dev | |
env: | |
VITE_AWS_USER_POOL_ID: ${{ vars.VITE_AWS_USER_POOL_ID }} | |
VITE_AWS_USER_POOLS_WEB_CLIENT_ID: ${{ vars.VITE_AWS_USER_POOLS_WEB_CLIENT_ID }} | |
VITE_AWS_PROJECT_REGION: ${{ vars.VITE_AWS_PROJECT_REGION }} | |
VITE_AWS_COGNITO_REGION: ${{ vars.VITE_AWS_COGNITO_REGION }} | |
VITE_PAGOPA_CATALOGUE: ${{ vars.VITE_PAGOPA_CATALOGUE }} | |
VITE_BASE_PATH: ${{ vars.VITE_BASE_PATH }} | |
permissions: | |
id-token: write | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c | |
- name: Configure AWS Credentials | |
uses: aws-actions/configure-aws-credentials@67fbcbb121271f7775d2e7715933280b06314838 | |
with: | |
role-to-assume: ${{ secrets.IAM_ROLE }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
- name: Set Node.js 20.x | |
uses: actions/setup-node@1a4442cacd436585916779262731d5b162bc6ec7 # v3 | |
with: | |
node-version: "20" | |
- uses: pnpm/action-setup@v3 | |
with: | |
run_install: true | |
- name: Install dependencies | |
run: | | |
pnpm install | |
- name: Build project | |
run: | | |
pnpm turbo build --filter probing-frontend | |
- name: Copy files to S3 Hosting bucket | |
run: | | |
aws s3 sync packages/probing-frontend/dist/ s3://${{ secrets.S3_BUCKET_NAME }} --delete | |
- name: Create invalidation for Cloudfront Distribution | |
run: | | |
aws cloudfront create-invalidation --distribution-id ${{ secrets.DISTRIBUTION_ID }} --paths "/*" |