-
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.
chore: updated to use different ref name on preview creation; added c…
…leanup action
- Loading branch information
1 parent
98f55d7
commit 7703a60
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
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 |
---|---|---|
|
@@ -41,7 +41,7 @@ jobs: | |
uses: jakejarvis/[email protected] | ||
env: | ||
SOURCE_DIR: 'build' | ||
DEST_DIR: 'catalog/${GITHUB_REF##*/}' | ||
DEST_DIR: 'catalog/${GITHUB_REF_NAME}' | ||
AWS_REGION: 'eu-central-1' | ||
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
|
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,25 @@ | ||
name: Delete catalog test deployment when pull request is closed / deleted | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
branches: | ||
- 'main' | ||
|
||
jobs: | ||
delete_folder: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Set up AWS credentials | ||
- name: Set up AWS credentials | ||
uses: aws-actions/configure-aws-credentials@v1 | ||
with: | ||
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
aws-region: eu-central-1 | ||
|
||
# Delete the folder from the S3 bucket | ||
- name: Delete folder from S3 | ||
run: | | ||
aws s3 rm s3://${{ secrets.AWS_S3_BUCKET }}/catalog/${GITHUB_REF_NAME} --recursive |