From a3b49acbc9d35e70566ee1c9b58e6a139a35f675 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Thu, 10 Oct 2024 01:28:34 +0200 Subject: [PATCH] Add GitHub Pages auto-deploy --- .github/workflows/gh-pages.yml | 50 ++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/gh-pages.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..24b3957 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,50 @@ +name: "Build and deploy to GitHub Pages" + +on: + push: + workflow_dispatch: + +defaults: + run: + shell: bash + +jobs: + build: + name: "Build website" + runs-on: ubuntu-latest + + steps: + - name: "Checkout repository" + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: "Setup Deno" + uses: denoland/setup-deno@v2 + + - name: "Build website" + run: >- + deno task build + + - name: "Upload pages artifact" + uses: actions/upload-pages-artifact@v3 + + deploy: + name: "Deploy website" + runs-on: ubuntu-latest + + needs: + - build + + permissions: + pages: write + id-token: write + + steps: + - name: "Deploy to GitHub Pages" + uses: actions/deploy-pages@v4 + id: deployment + + environment: + name: "GitHub Pages" + url: ${{ steps.deployment.outputs.page_url }}