File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010
1111jobs :
1212 tests :
13- name : " Tests "
13+ name : " Docs "
1414 runs-on : ubuntu-latest
1515 steps :
1616 - uses : actions/checkout@v2
@@ -30,10 +30,25 @@ jobs:
3030 with :
3131 name : docs-html
3232 path : docs/_build/html/
33- - name : publish docs
34- if : github.ref_name == 'main ' && github.ref_type == 'branch'
33+ - name : publish dev docs
34+ if : github.ref_name == 'docs-switch ' && github.ref_type == 'branch'
3535 uses : peaceiris/actions-gh-pages@v3
3636 with :
3737 github_token : ${{ secrets.GITHUB_TOKEN }}
3838 publish_dir : docs/_build/*
3939 publish_branch : gh-pages
40+ destination_dir : main
41+ - name : publish stable docs
42+ if : github.ref_name == 'main' && github.ref_type == 'tag' && startswith(github.ref, 'refs/tags/v')
43+ uses : peaceiris/actions-gh-pages@v3
44+ with :
45+ github_token : ${{ secrets.GITHUB_TOKEN }}
46+ publish_dir : docs/_build/*
47+ publish_branch : gh-pages
48+ destination_dir : github.ref_name
49+ - name : create symlink stable to new version
50+ if : github.ref_name == 'main' && github.ref_type == 'tag' && startswith(github.ref, 'refs/tags/v')
51+ run : |
52+ rm stable
53+ ln -s "${{ github.ref_name }}" stable
54+ ls -la
You can’t perform that action at this time.
0 commit comments