From ee85d8ae98cc3aa6e53e84d7c26e434139504156 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 | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 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..97f15b0 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,34 @@ +name: Static Site + +on: + push: + +jobs: + build: + name: Build + runs-on: ubuntu-24.04 + steps: + - run: actions/checkout@v4 + - 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