File tree Expand file tree Collapse file tree 3 files changed +11
-1
lines changed
template/{% if git_platform=="github.com" %}.github{% endif %}/workflows Expand file tree Collapse file tree 3 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 11on :
22 workflow_call :
3+ inputs :
4+ publish :
5+ type : boolean
6+ description : If true, publishes docs to gh-pages
7+
38
49jobs :
510 build :
4449 run : python .github/pages/make_switcher.py --add $DOCS_VERSION ${{ github.repository }} .github/pages/switcher.json
4550
4651 - name : Publish Docs to gh-pages
47- if : needs.test.result && (github.ref_type == 'tag' || github.ref_name == 'main')
52+ if : inputs.publish && (github.ref_type == 'tag' || github.ref_name == 'main')
4853 # We pin to the SHA, not the tag, for security reasons.
4954 # https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
5055 uses : peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
Original file line number Diff line number Diff line change 2929 needs : [check, test]
3030 if : needs.check.outputs.branch-pr == ''
3131 uses : ./.github/workflows/_docs.yml
32+ with :
33+ publish : ${{needs.test.result == 'success'}}
3234 permissions :
3335 contents : write
3436
Original file line number Diff line number Diff line change 4646 needs: [check, test]
4747 if: needs.check.outputs.branch-pr == ''
4848 uses: ./.github/workflows/_docs.yml
49+ with:
50+ publish: ${{needs.test.result == 'success'}}
51+
4952{% endif %}
5053 dist:
5154 needs: check
You can’t perform that action at this time.
0 commit comments