diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index fd3e798..01b20c4 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -7,40 +7,9 @@ on: branches: [main] workflow_dispatch: -# set permissions of GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - jobs: build: - runs-on: ubuntu-latest - steps: - - name: Check out repo - uses: actions/checkout@v3 - - - name: Set up node - uses: actions/setup-node@v3 - with: - node-version: 19 - cache: npm - cache-dependency-path: site/package.json - - - name: Install dependencies - run: cd site && npm install - - - name: Build site - run: cd site && npm run build - - - name: Upload build artifact - uses: actions/upload-pages-artifact@v1 - with: - path: site/build - - deploy: - needs: build - runs-on: ubuntu-latest - steps: - - name: Deploy to GitHub Pages - uses: actions/deploy-pages@v1 + uses: janosh/workflows/.github/workflows/nodejs-gh-pages.yml@main + with: + working-directory: site + install-cmd: npm install -f diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 9257248..f3119ec 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,24 +9,7 @@ on: jobs: tests: - runs-on: ubuntu-latest - - steps: - - name: Check out repo - uses: actions/checkout@v3 - - - name: Set up node - uses: actions/setup-node@v3 - with: - node-version: 19 - - - name: Install dependencies - run: | - cd site - npm install - npx playwright install chromium - - - name: Run tests - run: | - cd site - npm run test + uses: janosh/workflows/.github/workflows/npm-test-release.yml@main + with: + install-cmd: npm install --force + working-directory: site diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 5969e26..8171afd 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -52,14 +52,14 @@ repos: stages: [commit, commit-msg] - repo: https://github.com/pre-commit/mirrors-eslint - rev: v8.39.0 + rev: v8.41.0 hooks: - id: eslint types: [file] - files: \.(svelte|js|ts)$ + args: [--fix, --resolve-plugins-relative-to, ~/.cache/pre-commit] + files: \.(js|ts|svelte)$ additional_dependencies: - eslint - - svelte - typescript - eslint-plugin-svelte3 - '@typescript-eslint/eslint-plugin'