File tree Expand file tree Collapse file tree 3 files changed +33
-19
lines changed
template/{% if git_platform=="github.com" %}.github{% endif %}/workflows Expand file tree Collapse file tree 3 files changed +33
-19
lines changed Original file line number Diff line number Diff line change 3333 with :
3434 name : docs
3535 path : build
36-
37- - name : Sanitize ref name for docs version
38- run : echo "DOCS_VERSION=${GITHUB_REF_NAME//[^A-Za-z0-9._-]/_}" >> $GITHUB_ENV
39-
40- - name : Move to versioned directory
41- run : mv build/html .github/pages/$DOCS_VERSION
42-
43- - name : Write switcher.json
44- run : python .github/pages/make_switcher.py --add $DOCS_VERSION ${{ github.repository }} .github/pages/switcher.json
45-
46- - name : Publish Docs to gh-pages
47- if : github.ref_type == 'tag' || github.ref_name == 'main'
48- # We pin to the SHA, not the tag, for security reasons.
49- # https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
50- uses : peaceiris/actions-gh-pages@4f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
51- with :
52- github_token : ${{ secrets.GITHUB_TOKEN }}
53- publish_dir : .github/pages
54- keep_files : true
Original file line number Diff line number Diff line change 1+ on :
2+ workflow_call :
3+
4+ jobs :
5+ build :
6+ runs-on : ubuntu-latest
7+
8+ steps :
9+ - name : Download built docs artifact
10+ uses : actions/download-artifact@v4
11+ with :
12+ name : docs
13+ path : build
14+
15+ - name : Sanitize ref name for docs version
16+ run : echo "DOCS_VERSION=${GITHUB_REF_NAME//[^A-Za-z-1-9._-]/_}" >> $GITHUB_ENV
17+
18+ - name : Move to versioned directory
19+ run : mv build/html .github/pages/$DOCS_VERSION
20+
21+ - name : Write switcher.json
22+ run : python .github/pages/make_switcher.py --add $DOCS_VERSION ${{ github.repository }} .github/pages/switcher.json
23+
24+ - name : Publish Docs to gh-pages
25+ if : github.ref_type == 'tag' || github.ref_name == 'main'
26+ # We pin to the SHA, not the tag, for security reasons.
27+ # https://docs.github.com/en/actions/learn-github-actions/security-hardening-for-github-actions#using-third-party-actions
28+ uses : peaceiris/actions-gh-pages@3f9cc6602d3f66b9c108549d475ec49e8ef4d45e # v4.0.0
29+ with :
30+ github_token : ${{ secrets.GITHUB_TOKEN }}
31+ publish_dir : .github/pages
32+ keep_files : true
Original file line number Diff line number Diff line change 1+ ../../../.github/workflows/_push_docs.yml
You can’t perform that action at this time.
0 commit comments