@@ -22,14 +22,17 @@ jobs:
2222 defaults :
2323 run :
2424 shell : bash -l {0}
25+ env :
26+ REF_NAME : ${{ github.ref_name }}
2527
2628 steps :
27- - uses : actions/checkout@v7
29+ - uses : actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
2830 with :
2931 fetch-depth : 0
32+ persist-credentials : false
3033
3134 - name : Setup Micromamba env
32- uses : mamba-org/setup-micromamba@v3
35+ uses : mamba-org/setup-micromamba@d7c9bd84e824b79d2af72a2d4196c7f4300d3476 # v3.0.0
3336 with :
3437 environment-name : TEST
3538 init-shell : bash
@@ -45,28 +48,29 @@ jobs:
4548 run : |
4649 set -e
4750 pushd docs
51+
4852 make clean html linkcheck
4953 popd
5054
5155 - name : Update switcher and latest version
5256 if : ${{ github.event_name == 'release' }}
5357 run : |
54- python docs/update_switcher.py --version ${{ github.ref_name }}
58+ python docs/update_switcher.py --version $REF_NAME
5559
5660 - name : Create PR
5761 if : ${{ github.event_name == 'release' }}
58- uses : peter-evans/create-pull-request@v8
62+ uses : peter-evans/create-pull-request@5f6978faf089d4d20b00c7766989d076bb2fc7f1 # v8.1.1
5963 with :
60- commit-message : " docs: Update switcher.json for ${{ github.ref_name }} "
61- title : " docs: Update switcher.json for ${{ github.ref_name }} "
64+ commit-message : " docs: Update switcher.json for $REF_NAME "
65+ title : " docs: Update switcher.json for $REF_NAME "
6266 body : " This PR updates the switcher.json file."
63- branch : " docs/update-switcher-${{ github.ref_name }} "
67+ branch : " docs/update-switcher-$REF_NAME "
6468 base : " main"
6569 labels : " documentation"
6670
6771 - name : Publish to Github Pages on main
6872 if : ${{ github.ref == 'refs/heads/main' }}
69- uses : peaceiris/actions-gh-pages@v4
73+ uses : peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
7074 with :
7175 github_token : ${{ secrets.GITHUB_TOKEN }}
7276 publish_dir : docs/_build/html/
@@ -75,15 +79,15 @@ jobs:
7579
7680 - name : Publish to Github Pages on release (versioned)
7781 if : ${{ github.event_name == 'release' }}
78- uses : peaceiris/actions-gh-pages@v4
82+ uses : peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
7983 with :
8084 github_token : ${{ secrets.GITHUB_TOKEN }}
8185 publish_dir : docs/_build/html/
82- destination_dir : ${{ github.ref_name }}
86+ destination_dir : $REF_NAME
8387
8488 - name : Publish to Github Pages on release (latest)
8589 if : ${{ github.event_name == 'release' }}
86- uses : peaceiris/actions-gh-pages@v4
90+ uses : peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
8791 with :
8892 github_token : ${{ secrets.GITHUB_TOKEN }}
8993 publish_dir : docs/_build/html/
0 commit comments