Skip to content

Commit

Permalink
main - Skip tasks that shouldn't run on skip_deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
benjy44 committed Aug 14, 2024
1 parent bdd5689 commit 5f6fb4c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -339,15 +339,15 @@ runs:
shell: bash
id: deploy-options
- name: Determine if Development Mode is enabled
if: steps.deployment-preview.outputs.SKIP_DEPLOY == 'false'
run: |
if [[ ${{steps.deployment-preview.outputs.SKIP_DEPLOY}} == false ]]; then
echo "DEVELOPMENT_MODE=$(astro deployment inspect ${{steps.deployment-preview.outputs.FINAL_DEPLOYMENT_ID}} --clean-output --key configuration.is_development_mode)" >> $GITHUB_OUTPUT
fi
echo "DEVELOPMENT_MODE=$(astro deployment inspect ${{steps.deployment-preview.outputs.FINAL_DEPLOYMENT_ID}} --clean-output --key configuration.is_development_mode)" >> $GITHUB_OUTPUT
shell: bash
id: development-mode
- name: Override to wake up the Deployment
if: steps.deployment-preview.outputs.SKIP_DEPLOY == 'false'
run: |
if [[ ${{steps.deployment-preview.outputs.SKIP_DEPLOY}} == false && ${{steps.development-mode.outputs.DEVELOPMENT_MODE}} == true ]]; then
if [[ ${{steps.development-mode.outputs.DEVELOPMENT_MODE}} == true ]]; then
astro deployment wake-up ${{steps.deployment-preview.outputs.FINAL_DEPLOYMENT_ID}} --force
# Give it some time to wake up
sleep 60
Expand Down Expand Up @@ -382,8 +382,9 @@ runs:
fi
shell: bash
- name: Remove override on Deployment to resume schedule
if: steps.deployment-preview.outputs.SKIP_DEPLOY == 'false'
run: |
if [[ ${{steps.deployment-preview.outputs.SKIP_DEPLOY}} == false && ${{steps.development-mode.outputs.DEVELOPMENT_MODE}} == true ]]; then
if [[ ${{steps.development-mode.outputs.DEVELOPMENT_MODE}} == true ]]; then
astro deployment wake-up ${{steps.deployment-preview.outputs.FINAL_DEPLOYMENT_ID}} --remove-override --force
fi
shell: bash

0 comments on commit 5f6fb4c

Please sign in to comment.