Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 8 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,15 @@ on:
workflow_dispatch:

permissions:
contents: write # to write built files
contents: read

jobs:
build_npm:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: build
run: |
npm install
npm run build
- name: commit
if: github.event_name == 'pull_request'
run: |
git add docs/build

# commit built files
if ! git diff-index --quiet HEAD docs/build; then
git fetch origin ${{ github.head_ref}}
git checkout ${{ github.head_ref}}
git config user.name github-actions
git config user.email [email protected]
git commit -m "Rebuild"
git push -u origin ${{ github.head_ref}}
fi

# fail if there are uncommitted changes
exit `git diff --exit-code`
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version-file: package.json
- run: npm ci
- run: npm run build
4 changes: 4 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@
"dependencies": {
"sirv-cli": "^2.0.2",
"svelte-persisted-store": "^0.11.0"
},
"engines" : {
"npm" : ">=10",
"node" : ">=18.0.0"
}
}
Loading