diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index 666e78f..ef0bd75 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -34,7 +34,7 @@ jobs: - name: Checkout uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - - name: Setup PNPM + - name: Setup pnpm uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 - name: Setup Node.js diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..2d2dca6 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,67 @@ +name: Deploy + +on: + push: + branches: + - main + - 'renovate/**' + paths-ignore: + - '**.md' + - .gitignore + - 'assets/**' + - '.github/**' + - '!.github/workflows/deploy.yml' + + workflow_dispatch: + +jobs: + deploy: + name: Deploy + runs-on: ubuntu-latest + + permissions: + contents: read + pages: write + id-token: write + + concurrency: + group: pages + cancel-in-progress: false + + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 + + - name: Setup pnpm + uses: pnpm/action-setup@a3252b78c470c02df07e9d59298aecedc3ccdd6d # v3.0.0 + + - name: Setup Node.js + uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2 + with: + node-version: 18 + cache: pnpm + + - name: Configure GitHub Pages + uses: actions/configure-pages@v5.0.0 + with: + static_site_generator: sveltekit + + - name: Install dependencies + run: pnpm install + + - name: Build + run: pnpm run build + + - name: Upload GitHub Pages artifact + uses: actions/upload-pages-artifact@v3.0.1 + with: + path: dist + + - name: Deploy GitHub Pages site + id: deployment + uses: actions/deploy-pages@v4.0.5 + if: github.event_name == 'push' && github.ref == 'refs/heads/main'