Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Limit deploy to has pages
  • Loading branch information
jsoref committed Aug 28, 2022
commit 48b4f4fe711b9a5a45c0f7acdea37b00cc43ee45
12 changes: 11 additions & 1 deletion .github/workflows/deploy_production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
outputs:
# To avoid deploying documentation for unrelease changes, we check the number of changeset files.
# If it's 0, we deploy.
should_deploy: ${{ steps.changeset-count.outputs.change_count == 0 }}
should_deploy: ${{ steps.changeset-count.outputs.change_count == 0 && steps.has-pages.outputs.pages == 1 }}
steps:
- uses: actions/checkout@v2

Expand All @@ -28,6 +28,16 @@ jobs:
- name: Log changeset count
run: echo ${{ steps.changeset-count.outputs.change_count }}

- id: has-pages
name: Check if pages is configured
run: |
if gh api --silent https://api.github.com/repos/${{ github.repository }}/pages ; then
echo "::set-output name=pages::1"
fi

- name: Log has pages
run: echo ${{ steps.has-pages.outputs.pages }}

# Log guard output for debugging purposes
- name: Log guard output
run: echo ${{ needs.guard.outputs.should_deploy }}
Expand Down