From 93682a8012b40e27871dd787e89714dbffc09a84 Mon Sep 17 00:00:00 2001 From: jamie Date: Fri, 20 Jun 2025 21:03:36 +0100 Subject: feat: add gh actions --- .github/workflows/publish.yml | 54 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/publish.yml (limited to '.github') diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..1d297d8 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,54 @@ +name: Deploy Hakyll website to GitHub Pages using Nix + +on: + push: + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Install Act Dependencies + if: ${{ env.ACT }} + run: | + apt-get update && apt-get install sudo -y + + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Nix + uses: cachix/install-nix-action@v31 + with: + github_access_token: ${{ secrets.GITHUB_TOKEN }} + + - name: Build Site using Hakyll + run: nix run .# build + + - name: Setup Pages + id: pages + uses: actions/configure-pages@v5 + + - name: Upload Artifact + uses: actions/upload-pages-artifact@v3 + with: + path: ./_site + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 -- cgit v1.3.1