File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
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 : needs.test.result && (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
You can’t perform that action at this time.
0 commit comments