diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..cd762b2 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,52 @@ +name: Deploy GitHub Pages + +on: + push: + branches: [main] + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + defaults: + run: + working-directory: ./app + + steps: + - uses: actions/checkout@v3 + + - uses: pnpm/action-setup@v2 + with: + version: 9 + + - uses: actions/setup-node@v3 + with: + node-version: 20 + cache: pnpm + + - run: pnpm install + - run: pnpm run build + + - name: Setup Pages + uses: actions/configure-pages@v3 + with: + static_site_generator: "sveltekit" + + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: build/ + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + + steps: + - uses: actions/deploy-pages@v2 + id: deployment