File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,12 +3,12 @@ name: Deploy David KRK Site
33on :
44 push :
55 branches : [gh-pages]
6+ pull_request :
7+ branches : [gh-pages]
68 workflow_dispatch :
79
810permissions :
911 contents : read
10- pages : write
11- id-token : write
1212
1313concurrency :
1414 group : " pages"
@@ -17,6 +17,8 @@ concurrency:
1717jobs :
1818 build :
1919 runs-on : ubuntu-latest
20+ permissions :
21+ contents : read
2022 steps :
2123 - name : Checkout
2224 uses : actions/checkout@v4
@@ -34,14 +36,25 @@ jobs:
3436 run : npm run build
3537
3638 - name : Setup Pages
39+ if : github.event_name == 'push'
3740 uses : actions/configure-pages@v4
3841
42+ - name : Remove node_modules before upload
43+ if : github.event_name == 'push'
44+ run : rm -rf node_modules
45+
3946 - name : Upload artifact
47+ if : github.event_name == 'push'
4048 uses : actions/upload-pages-artifact@v3
4149 with :
4250 path : ' .'
4351
4452 deploy :
53+ if : github.event_name == 'push'
54+ permissions :
55+ contents : read
56+ pages : write
57+ id-token : write
4558 environment :
4659 name : github-pages
4760 url : ${{ steps.deployment.outputs.page_url }}
5063 steps :
5164 - name : Deploy to GitHub Pages
5265 id : deployment
53- uses : actions/deploy-pages@v4
66+ uses : actions/deploy-pages@v4
Original file line number Diff line number Diff line change 1- # Workflow désactivé temporairement pour éviter les conflits avec deploy.yml
2- # Le workflow deploy.yml gère maintenant tous les déploiements sur gh-pages
1+ name : Site Build Check (no deploy)
2+
3+ on :
4+ pull_request :
5+ branches : [gh-pages]
6+ schedule :
7+ - cron : ' 0 5 * * 1'
8+ workflow_dispatch :
9+
10+ permissions :
11+ contents : read
12+
13+ jobs :
14+ build :
15+ runs-on : ubuntu-latest
16+ steps :
17+ - name : Checkout
18+ uses : actions/checkout@v4
19+ with :
20+ ref : gh-pages
21+
22+ - name : Setup Node.js
23+ uses : actions/setup-node@v4
24+ with :
25+ node-version : ' 20'
26+ cache : ' npm'
27+
28+ - name : Install dependencies
29+ run : npm ci --prefer-offline --no-audit
30+
31+ - name : Build site assets
32+ run : npm run build
You can’t perform that action at this time.
0 commit comments