summaryrefslogtreecommitdiff
path: root/.github/workflows/blog.yaml
diff options
context:
space:
mode:
authorKleidi Bujari <mail@4kb.net>2024-12-18 20:17:41 -0500
committerKleidi Bujari <mail@4kb.net>2024-12-18 20:20:52 -0500
commitb847b87823dfd7e1b7870c67ea32199bc607f852 (patch)
tree54a2923544e0bb765a3218e8c40c793f952ca421 /.github/workflows/blog.yaml
parenteb13a9a552f9e50a66faba985521ba8e3483c447 (diff)
downloaddepot-b847b87823dfd7e1b7870c67ea32199bc607f852.tar.gz
depot-b847b87823dfd7e1b7870c67ea32199bc607f852.tar.bz2
depot-b847b87823dfd7e1b7870c67ea32199bc607f852.zip
Enable github actions
Moved personal blog to be built in this tree. Also enables github actions to host the site on pages.
Diffstat (limited to '.github/workflows/blog.yaml')
-rw-r--r--.github/workflows/blog.yaml39
1 files changed, 39 insertions, 0 deletions
diff --git a/.github/workflows/blog.yaml b/.github/workflows/blog.yaml
new file mode 100644
index 0000000..fc2c444
--- /dev/null
+++ b/.github/workflows/blog.yaml
@@ -0,0 +1,39 @@
+name: Deploy Blog
+
+on:
+ push:
+ branches:
+ - master
+
+permissions:
+ contents: read
+ pages: write
+ id-token: write
+
+jobs:
+ build-and-deploy:
+ runs-on: ubuntu-latest
+ environment:
+ name: github-pages
+ url: ${{ steps.deployment.outputs.page_url }}
+
+ steps:
+ - uses: actions/checkout@v4
+
+ - name: Install Nix
+ uses: DeterminateSystems/nix-installer-action@main
+
+ - name: Build blog
+ run: nix build .#depot.web.blog
+
+ - name: Setup Pages
+ uses: actions/configure-pages@v4
+
+ - name: Upload artifact
+ uses: actions/upload-pages-artifact@v3
+ with:
+ path: "result"
+
+ - name: Deploy to GitHub Pages
+ id: deployment
+ uses: actions/deploy-pages@v4