Skip to content

Commit 4cf38b3

Browse files
authored
chore: version node (#67)
* chore: version node * Rename job from build_npm to build
1 parent e79cfff commit 4cf38b3

File tree

2 files changed

+12
-24
lines changed

2 files changed

+12
-24
lines changed

.github/workflows/ci.yml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -7,31 +7,15 @@ on:
77
workflow_dispatch:
88

99
permissions:
10-
contents: write # to write built files
10+
contents: read
1111

1212
jobs:
13-
build_npm:
13+
build:
1414
runs-on: ubuntu-latest
1515
steps:
16-
- uses: actions/checkout@v4
17-
- name: build
18-
run: |
19-
npm install
20-
npm run build
21-
- name: commit
22-
if: github.event_name == 'pull_request'
23-
run: |
24-
git add docs/build
25-
26-
# commit built files
27-
if ! git diff-index --quiet HEAD docs/build; then
28-
git fetch origin ${{ github.head_ref}}
29-
git checkout ${{ github.head_ref}}
30-
git config user.name github-actions
31-
git config user.email [email protected]
32-
git commit -m "Rebuild"
33-
git push -u origin ${{ github.head_ref}}
34-
fi
35-
36-
# fail if there are uncommitted changes
37-
exit `git diff --exit-code`
16+
- uses: actions/checkout@v4
17+
- uses: actions/setup-node@v4
18+
with:
19+
node-version-file: package.json
20+
- run: npm ci
21+
- run: npm run build

package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,9 @@
2626
"dependencies": {
2727
"sirv-cli": "^2.0.2",
2828
"svelte-persisted-store": "^0.11.0"
29+
},
30+
"engines" : {
31+
"npm" : ">=10",
32+
"node" : ">=18.0.0"
2933
}
3034
}

0 commit comments

Comments
 (0)