2023-10-04-additions #42
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
# This is a basic workflow takes care of building and deploying | |
# catalog when creating merge request to main branch | |
# Workflow for deploying content to bucket | |
name: Deploy test static content to s3 bucket | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
branches: | |
- 'main' | |
concurrency: preview-${{ github.ref }} | |
jobs: | |
deploy-preview: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Pages | |
uses: actions/configure-pages@v3 | |
- name: Install dependencies | |
run: | | |
pip install -U pip | |
pip install -r generators/requirements.txt | |
- name: Build | |
env: | |
SH_INSTANCE_ID: ${{ secrets.SH_INSTANCE_ID }} | |
SH_CLIENT_ID: ${{ secrets.SH_CLIENT_ID }} | |
SH_CLIENT_SECRET: ${{ secrets.SH_CLIENT_SECRET }} | |
run: | | |
cd generators/ | |
python generate_indicators.py -ni | |
# Upload build to S3 | |
- name: sync client s3 | |
uses: jakejarvis/[email protected] | |
env: | |
SOURCE_DIR: 'build' | |
DEST_DIR: 'catalog/${{ github.event.pull_request.head.ref }}' | |
AWS_REGION: 'eu-central-1' | |
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |