Skip to content

Commit 6fcd749

Browse files
authored
Add in more safety around deployment (#248)
1 parent 37fada2 commit 6fcd749

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ jobs:
5454
setup-environment:
5555
runs-on: ubuntu-latest
5656
outputs:
57-
deploy_dir: ${{ steps.deploy_dir.outputs.deploy_dir }}
58-
public_url: ${{ steps.public_url.outputs.public_url }}
57+
deploy_dir: ${{ steps.setup-environment.outputs.deploy_dir }}
58+
public_url: ${{ steps.setup-environment.outputs.public_url }}
5959
steps:
60-
- id: safe_ref_name
60+
- id: setup-environment
6161
run: |
6262
safe_ref_name="${GITHUB_REF_NAME//[![:alnum:].]/_}"
6363
deploy_dir=${{inputs.prefix}}/$safe_ref_name
@@ -72,6 +72,12 @@ jobs:
7272
name: ${{ inputs.environment }}
7373
url: ${{ needs.setup-environment.outputs.public_url }}
7474
steps:
75+
76+
- name: Check deployment path
77+
run: |
78+
echo "Deploying to '${{ needs.setup-environment.outputs.deploy_dir }}' -- job will fail if this is empty!"
79+
[ -n "${{ needs.setup-environment.outputs.deploy_dir }}" ]
80+
7581
- name: Checkout
7682
uses: actions/checkout@v1
7783

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
1010
### Changed
1111

1212
- Set indentation to 4 spaces to match PEP8 standard (#246)
13-
- Update Github workflow not to strip dots from the git ref, and remove test dependency for main and ref deploys (#244)
13+
- Update Github workflow not to strip dots from the git ref, and remove test dependency for main and ref deploys (#244, #248)
1414

1515
## [0.6.0]
1616

0 commit comments

Comments
 (0)