Skip to content

Commit 03ff0d6

Browse files
committed
ci: only run gh pages build if index.html or styles changed
1 parent 7f4f51e commit 03ff0d6

File tree

2 files changed

+14
-9
lines changed

2 files changed

+14
-9
lines changed

.cursor/modes.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@
7676
"terminal"
7777
],
7878
"allowedMcpTools": [
79-
"web_search",
8079
],
8180
"autoApplyEdits": false,
8281
"autoRun": false,

.github/workflows/pages.yml

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,6 @@ name: Deploy to GitHub Pages
33
on:
44
push:
55
branches: [ "main" ]
6-
paths:
7-
- 'index.html'
8-
- '.github/workflows/pages.yml'
96
workflow_dispatch:
107

118
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
@@ -23,20 +20,29 @@ jobs:
2320
steps:
2421
- name: Checkout
2522
uses: actions/checkout@v4
26-
23+
24+
- name: Change detection
25+
id: changes
26+
uses: dorny/paths-filter@v3
27+
with:
28+
filters: |
29+
index: index.html
30+
styles: styles.css
31+
2732
- name: Setup Pages
2833
uses: actions/configure-pages@v4
29-
34+
3035
- name: Create artifact directory
3136
run: |
3237
mkdir _site
3338
cp index.html _site/
34-
39+
cp styles.css _site/
40+
3541
- name: Upload artifact
3642
uses: actions/upload-pages-artifact@v3
3743
with:
38-
path: '_site'
39-
44+
path: "_site"
45+
4046
- name: Deploy to GitHub Pages
4147
id: deployment
4248
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)