Skip to content

Commit 85f869e

Browse files
committed
ci: modernize Pages workflow (latest actions, pip cache, _site artifact)
1 parent b9ead70 commit 85f869e

1 file changed

Lines changed: 10 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -27,24 +27,23 @@ jobs:
2727
runs-on: ubuntu-latest
2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
3131
- name: Setup Pages
32-
uses: actions/configure-pages@v2
32+
uses: actions/configure-pages@v4
3333
- name: Setup Python
34-
uses: actions/setup-python@v4
34+
uses: actions/setup-python@v5
3535
with:
36-
python-version: '3.11'
36+
python-version-file: '.python-version'
37+
cache: 'pip'
38+
cache-dependency-path: 'requirements.txt'
3739
- name: Install MkDocs and other requirements
3840
run: pip install -r requirements.txt
39-
- name: Setup caching
40-
uses: actions/cache@v3
41-
with:
42-
key: ${{ github.sha }}
43-
path: .cache
4441
- name: Build site (_site directory name is used for Jekyll compatibility)
4542
run: mkdocs build --config-file ./mkdocs.yml --site-dir ./_site
4643
- name: Upload artifact
47-
uses: actions/upload-pages-artifact@v1
44+
uses: actions/upload-pages-artifact@v3
45+
with:
46+
path: ./_site
4847

4948
# Deployment job
5049
deploy:
@@ -56,4 +55,4 @@ jobs:
5655
steps:
5756
- name: Deploy to GitHub Pages
5857
id: deployment
59-
uses: actions/deploy-pages@v1
58+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)