Downgrade JSDom because of issue #1483
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Main | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**/*.md' | |
| - '.vscode/**' | |
| - '.husky/**' | |
| - '.devcontainer/**' | |
| pull_request: | |
| paths-ignore: | |
| - '**/*.md' | |
| - '.vscode/**' | |
| - '.husky/**' | |
| - '.devcontainer/**' | |
| jobs: | |
| test: | |
| name: General Tests | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden the runner | |
| uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 | |
| with: | |
| egress-policy: block | |
| allowed-endpoints: > | |
| api.github.com:443 | |
| github.com:443 | |
| nodejs.org:443 | |
| release-assets.githubusercontent.com:443 | |
| objects.githubusercontent.com:443 | |
| registry.npmjs.org:443 | |
| storybook.js.org:443 | |
| - name: Checkout the repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Initialize Node.js | |
| uses: ./.github/actions/init-node | |
| - name: Run tests | |
| run: pnpm run -r --include-workspace-root '/^test:(?!online:markdown\b|proxy-coverage\b|server-coverage\b|online:loaders\b)/' | |
| env: | |
| FORCE_COLOR: 1 | |
| STAGING: 1 | |
| - name: Double-check Svelte types with old tool | |
| run: cd web && pnpm svelte-check | |
| - name: Build nginx config | |
| run: cd web && ./scripts/build-nginx-config.sh | |
| - name: Upload web assets | |
| if: github.ref == 'refs/heads/main' | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: web-client-assets-${{ github.sha }} | |
| retention-days: 1 | |
| include-hidden-files: true | |
| path: | | |
| web/dist/ | |
| web/nginx.conf.compiled | |
| staging: | |
| name: Web Staging Deploy | |
| needs: test | |
| if: github.ref == 'refs/heads/main' | |
| permissions: | |
| contents: read | |
| packages: write | |
| concurrency: | |
| group: staging-web | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Harden the runner | |
| uses: step-security/harden-runner@20cf305ff2072d973412fa9b1e3a4f227bda3c76 # v2.14.0 | |
| with: | |
| egress-policy: block | |
| allowed-endpoints: > | |
| 9236a389bd48b984df91adc1bc924620.r2.cloudflarestorage.com:443 | |
| api.github.com:443 | |
| cgr.dev:443 | |
| github.com:443 | |
| raw.githubusercontent.com:443 | |
| ghcr.io:443 | |
| pkg-containers.githubusercontent.com:443 | |
| cloud.hplush.dev:443 | |
| - name: Checkout the repository | |
| uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 | |
| - name: Download web assets from test step | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| name: web-client-assets-${{ github.sha }} | |
| path: web/ | |
| - name: Deploy | |
| uses: ./.github/actions/deploy | |
| with: | |
| image-name: slowreader-web | |
| context: ./web/ | |
| application-id: UfN7W6Kqhd3kw8QmKRELX | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| dokploy-token: ${{ secrets.DOKPLOY_TOKEN }} |