From ed0dddab6c2f1f4cb0af8231a5401f7a08bbe164 Mon Sep 17 00:00:00 2001 From: Marcus Weiner Date: Sat, 8 Jun 2024 18:43:51 +0200 Subject: [PATCH] Publish static site to GH pages --- .github/workflows/build.yaml | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/build.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..4cbf81e --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,33 @@ +name: Static Site + +on: + push: + +jobs: + build: + name: Build + runs-on: ubuntu-24.04 + steps: + - name: Install dependencies + run: npm ci + - name: Build site + run: npm run build + - name: Upload artifacts + uses: actions/upload-pages-artifact@v3 + with: + path: dist + + deploy: + if: github.ref_name == github.event.repository.default_branch + needs: build + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4