@@ -5,54 +5,53 @@ name: Docs
55
66on :
77 push :
8+ branches-ignore :
9+ - copier-update
10+ - mega-linter-fix/**
11+ - pre-commit-ci-update-config
12+ - release-please--branches**
813 pull_request :
914 workflow_dispatch :
1015
1116jobs :
12- skip-duplicate :
13- name : Skip Duplicate
14- permissions :
15- actions : write
16- runs-on : ubuntu-latest
17- outputs :
18- should-skip : ${{ steps.skip-duplicate.outputs.should-skip }}
19- steps :
20- - id : skip-duplicate
21- name : Skip Duplicate
22- uses : liblaf/actions/skip-duplicate@dist
23- with :
24- cancel-others : true
25-
26- docs :
27- name : Docs
28- permissions :
29- contents : write
30- pages : write
31- needs :
32- - skip-duplicate
33- if : needs.skip-duplicate.outputs.should-skip != 'true'
17+ build :
18+ name : Build
3419 runs-on : ubuntu-latest
3520 steps :
3621 - name : Checkout
3722 uses : actions/checkout@v5
3823 with :
3924 fetch-depth : 0
25+ - id : config
26+ name : Configure GitHub Pages
27+ uses : actions/configure-pages@v5
28+ - name : Set Environment Variables
29+ run : printf 'SITE_URL=%s\n' '${{ steps.config.outputs.base_url }}' >> "$GITHUB_ENV"
4030 - name : Setup Python
41- uses : liblaf/actions/setup-python@dist
31+ uses : liblaf/actions/setup-python@v1
4232 - if : hashFiles('docs/scripts/pre-build.sh') != ''
4333 name : Pre-Build
4434 run : docs/scripts/pre-build.sh
4535 - name : Build
4636 run : mkdocs build
47- - if : ${{ github.ref == 'refs/heads/main' }}
48- name : Deploy
49- uses : JamesIves/github-pages-deploy-action@v4
37+ - name : Upload Github Pages Artifact
38+ uses : actions/upload-pages-artifact@v4
5039 with :
51- folder : site
52- single-commit : true
53- - if : ${{ github.ref == 'refs/heads/main' }}
54- name : Setup GitHub Pages
55- uses : liblaf/actions/setup-pages@dist
56- with :
57- token : ${{ github.token }}
58- continue-on-error : true
40+ path : site
41+
42+ deploy :
43+ name : Deploy
44+ permissions :
45+ id-token : write
46+ pages : write
47+ needs :
48+ - build
49+ if : github.ref == 'refs/heads/main'
50+ runs-on : ubuntu-latest
51+ environment :
52+ name : github-pages
53+ url : ${{ steps.deploy.outputs.page_url }}
54+ steps :
55+ - id : deploy
56+ name : Deploy Github Pages Site
57+ uses : actions/deploy-pages@v4
0 commit comments