2025.8.0 #70
Workflow file for this run
This file contains hidden or 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 PROD | |
| on: | |
| # Triggers the workflow on creation of release (not pre-release) | |
| # and deploys on S3 to https://merginmaps.com/docs | |
| release: | |
| types: | |
| - released | |
| concurrency: | |
| group: dist-prod-${{ github.head_ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| deploy_prod: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - uses: actions/setup-node@v3 | |
| with: | |
| node-version: 20 | |
| cache: 'yarn' | |
| - name: Install | |
| run: | | |
| yarn install | |
| - name: Generate dist | |
| env: | |
| SMARTLOOK_KEY: ${{ secrets.SMARTLOOK_KEY }} | |
| run: | | |
| echo "VITE_SMARTLOOK_KEY=$SMARTLOOK_KEY" > ./src/.env | |
| yarn build | |
| - name: "Check dist dir consistency" | |
| uses: andstor/file-existence-action@v1 | |
| with: | |
| files: "dist/docs/index.html" | |
| allow_failure: true # Makes the Action fail on missing files | |
| - name: Configure AWS credentials | |
| uses: aws-actions/configure-aws-credentials@v1 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }} | |
| aws-secret-access-key: ${{ secrets.AWS_ACCESS_PASSWORD }} | |
| aws-region: eu-west-1 | |
| - name: Copy files to the https://merginmaps.com/docs | |
| run: | | |
| aws s3 sync ./dist s3://main-merginmaps.docs --follow-symlinks --delete | |