diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index be45075..ff447de 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 github-actions@github.com - 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 diff --git a/package.json b/package.json index dbb1583..fb46283 100644 --- a/package.json +++ b/package.json @@ -26,5 +26,9 @@ "dependencies": { "sirv-cli": "^2.0.2", "svelte-persisted-store": "^0.11.0" + }, + "engines" : { + "npm" : ">=10", + "node" : ">=18.0.0" } }