Skip to content

Commit 1cff9b4

Browse files
committed
Updated documentation building workflows to use new actions
1 parent ea051f9 commit 1cff9b4

File tree

2 files changed

+30
-16
lines changed

2 files changed

+30
-16
lines changed

.github/workflows/docs-on-release.yml

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,32 +12,39 @@ jobs:
1212
environment: dev_environment
1313
runs-on: ubuntu-latest
1414
steps:
15-
- name: Get Python 3.10
16-
uses: actions/setup-python@v4
15+
- name: Get Python 3.12
16+
uses: actions/setup-python@v5
1717
with:
18-
python-version: '3.10'
18+
python-version: "3.12"
1919
- name: Checkout
2020
uses: actions/checkout@v4
2121
with:
2222
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
2323
- name: Get version set env, exit if beta release
2424
run: |
25-
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
26-
if [[ "$RELEASE_VERSION" == *"b"* ]]; then
27-
echo "Version is a beta release. Cancel workflow."
28-
exit 0
29-
fi
25+
echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
26+
if [[ "$RELEASE_VERSION" == *"b"* ]]; then
27+
echo "Version is a beta release. Cancel workflow."
28+
exit 0
29+
fi
3030
- name: Install dependencies
3131
run: |
3232
sudo apt-get update;
3333
sudo apt-get install pandoc;
3434
pip install -e .
35-
- name: Build and Commit
36-
uses: sphinx-notes/pages@v2
35+
- name: Build
36+
uses: sphinx-notes/pages@v3
3737
with:
38+
python_version: 3.12
3839
requirements_path: doc/requirements.txt
3940
documentation_path: doc/source
40-
target_path: ${{ env.RELEASE_VERSION }}
41+
publish: false
42+
- name: Commit
43+
uses: peaceiris/actions-gh-pages@v4
44+
with:
45+
github_token: ${{ secrets.GITHUB_TOKEN }}
46+
publish_dir: ${{ steps.deployment.outputs.artifact }}
47+
destination_dir: ${{ env.RELEASE_VERSION }}
4148
- name: Redirect stable to new release
4249
run: |
4350
echo "Redirecting stable to newly released version " $RELEASE_VERSION

.github/workflows/docs.yml

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@ jobs:
1313
# The type of runner that the job will run on
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/setup-python@v4
16+
- uses: actions/setup-python@v5
1717
with:
18-
python-version: '3.10'
18+
python-version: "3.12"
1919
- name: Checkout
2020
uses: actions/checkout@v4
2121
with:
@@ -25,12 +25,19 @@ jobs:
2525
sudo apt-get update;
2626
sudo apt-get install pandoc;
2727
pip install -e .
28-
- name: Build and Commit
29-
uses: sphinx-notes/pages@v2
28+
- name: Build
29+
uses: sphinx-notes/pages@v3
3030
with:
31+
python_version: 3.12
3132
requirements_path: doc/requirements.txt
3233
documentation_path: doc/source
33-
target_path: latest
34+
publish: false
35+
- name: Commit
36+
uses: peaceiris/actions-gh-pages@v4
37+
with:
38+
github_token: ${{ secrets.GITHUB_TOKEN }}
39+
publish_dir: ${{ steps.deployment.outputs.artifact }}
40+
destination_dir: ${{ env.RELEASE_VERSION }}
3441
- name: Push changes
3542
uses: ad-m/github-push-action@master
3643
with:

0 commit comments

Comments
 (0)