2024.10.2 #49
Workflow file for this run
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 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 | |
# need Node 16 or less to get rid of ERR_OSSL_EVP_UNSUPPORTED | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
- name: Install | |
run: | | |
yarn install | |
- name: Generate dist | |
run: | | |
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 | |