-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merging workflow for test deployments to bucket to main (#43)
* feat: adding deployment of test deployments when creating pull requests to main * chore: name change * chore: update of workflow name
- Loading branch information
1 parent
a65c25c
commit 139f73c
Showing
2 changed files
with
57 additions
and
2 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
.github/workflows/build.yaml → .github/workflows/build_main.yaml
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# 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_target: | ||
types: | ||
- opened | ||
branches: | ||
- 'main' | ||
|
||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "bucket_deploy" | ||
cancel-in-progress: false | ||
|
||
jobs: | ||
deploy: | ||
environment: | ||
name: test_deploy | ||
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 | ||
# Upload build to S3 | ||
- name: sync client s3 | ||
uses: jakejarvis/[email protected] | ||
with: | ||
args: --delete --follow-symlinks' | ||
env: | ||
SOURCE_DIR: 'build' | ||
DEST_DIR: 'catalog/${GITHUB_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 }} | ||
|