diff options
| author | jamie <git@skilet.ro> | 2025-06-20 21:03:36 +0100 |
|---|---|---|
| committer | jamie <git@skilet.ro> | 2025-06-20 21:03:36 +0100 |
| commit | 93682a8012b40e27871dd787e89714dbffc09a84 (patch) | |
| tree | c01c487586a5d499596c868a9ed3cfb3868579ba | |
| parent | 61899195cced44d0ccb764f43386b7170b603152 (diff) | |
feat: add gh actions
| -rw-r--r-- | .github/workflows/publish.yml | 54 |
1 files changed, 54 insertions, 0 deletions
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 |
