1111
1212# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1313permissions :
14- contents : read
15- pages : write
16- id-token : write
14+ contents : write
1715
1816# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
1917# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
@@ -23,72 +21,55 @@ concurrency:
2321
2422env :
2523 NODE_VERSION : " 22"
24+ FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 : true
2625
2726jobs :
28- # Build job
29- build :
27+ build-deploy :
3028 runs-on : ubuntu-latest
3129 steps :
3230 - name : Checkout
3331 uses : actions/checkout@v4
34-
32+
3533 - name : Setup Node.js
3634 uses : actions/setup-node@v4
3735 with :
3836 node-version : ${{ env.NODE_VERSION }}
3937 cache : ' npm'
40-
41- - name : Cache Eleventy build artifacts
38+
39+ - name : Cache Eleventy incremental build state
4240 uses : actions/cache@v4
4341 with :
44- path : |
45- dist
46- .cache
47- _site
48- key : eleventy-build-${{ runner.os }}-${{ hashFiles('src/**/*', 'content/**/*', 'media/**/*', 'eleventy.config.js', 'postcss.config.js', 'package-lock.json') }}
42+ path : .cache
43+ key : eleventy-build-${{ runner.os }}-${{ hashFiles('eleventy.config.js', 'package-lock.json') }}-${{ github.sha }}
4944 restore-keys : |
50- eleventy-build-${{ runner.os }}-${{ hashFiles('eleventy.config.js', 'postcss.config.js', ' package-lock.json') }}
51-
45+ eleventy-build-${{ runner.os }}-${{ hashFiles('eleventy.config.js', 'package-lock.json') }}-
46+
5247 - name : Cache processed images
5348 uses : actions/cache@v4
5449 with :
55- path : |
56- dist/img
57- .cache/img
58- key : eleventy-img-${{ runner.os }}-${{ hashFiles('media/**/*', 'src/_11ty/shortcodes.js') }}
50+ path : dist/img
51+ key : eleventy-img-${{ runner.os }}-${{ hashFiles('src/_11ty/shortcodes.js') }}-${{ github.sha }}
5952 restore-keys : |
60- eleventy-img-${{ runner.os }}-${{ hashFiles('media/**/* ') }}
61-
53+ eleventy-img-${{ runner.os }}-${{ hashFiles('src/_11ty/shortcodes.js ') }}-
54+
6255 - name : Cache CSS build
6356 uses : actions/cache@v4
6457 with :
6558 path : dist/styles
66- key : css-build-${{ runner.os }}-${{ hashFiles('src/site.css', 'src/_styles/**/*', ' postcss.config.js') }}
59+ key : css-build-${{ runner.os }}-${{ hashFiles('postcss.config.js') }}-${{ github.sha }}
6760 restore-keys : |
68- css-build-${{ runner.os }}-${{ hashFiles('postcss.config.js') }}
69-
61+ css-build-${{ runner.os }}-${{ hashFiles('postcss.config.js') }}-
62+
7063 - name : Install dependencies
7164 run : npm ci
72-
65+
7366 - name : Build site
7467 run : npm run build
75-
76- - name : Setup Pages
77- uses : actions/configure-pages@v5
78-
79- - name : Upload artifact
80- uses : actions/upload-pages-artifact@v4
81- with :
82- path : ./dist
8368
84- # Deployment job
85- deploy :
86- environment :
87- name : github-pages
88- url : ${{ steps.deployment.outputs.page_url }}
89- runs-on : ubuntu-latest
90- needs : build
91- steps :
9269 - name : Deploy to GitHub Pages
93- id : deployment
94- uses : actions/deploy-pages@v4
70+ uses : peaceiris/actions-gh-pages@v4
71+ with :
72+ github_token : ${{ secrets.GITHUB_TOKEN }}
73+ publish_dir : ./dist
74+ force_orphan : true
75+ cname : recipe.polente.de
0 commit comments