Skip to content

Commit 6a5ce89

Browse files
committed
.
1 parent 60be59d commit 6a5ce89

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/docs-deploy.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,14 @@ jobs:
1313
check:
1414
runs-on: ubuntu-latest
1515
name: Check requirements
16+
outputs:
17+
deploy: ${{ steps.collect.outputs.deploy }}
1618
steps:
1719
- if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/docs'
1820
name: Detect manual run
1921
run: |
2022
echo "Detected manual run."
23+
echo "deploy=true" >> "$GITHUB_OUTPUT"
2124
2225
- if: github.event_name == 'push'
2326
name: Checkout repository
@@ -39,14 +42,20 @@ jobs:
3942
4043
if [ "$PR_COUNT" -eq 0 ]; then
4144
echo "Commit $GITHUB_SHA is not from a merged PR to 'docs'. Exiting."
42-
exit 1
45+
exit 0
4346
fi
4447
4548
echo "Commit $GITHUB_SHA is from a merged PR."
49+
echo "deploy=true" >> "$GITHUB_OUTPUT"
50+
51+
- name: Collect final deploy value
52+
id: collect
53+
run: ""
4654

4755
docs:
48-
uses: codeshelldev/gh-actions/.github/workflows/docs-deploy.yml@main
4956
needs: check
57+
if: needs.check.outputs.deploy == 'true'
58+
uses: codeshelldev/gh-actions/.github/workflows/docs-deploy.yml@main
5059
name: Deploy
5160
with:
5261
branch: docs

0 commit comments

Comments
 (0)