File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments