about summary refs log tree commit diff
path: root/.github
diff options
context:
space:
mode:
authorNgô Ngọc Đức Huy <huyngo@disroot.org>2021-04-12 13:14:48 +0700
committerNgô Ngọc Đức Huy <huyngo@disroot.org>2021-04-12 13:18:47 +0700
commitf928a9cb3a4f2161a58f8f7ad86d8e98d0808c26 (patch)
treeebc0a610817e3708c92650f93d1355a707c72154 /.github
parentead5086186e45c09222c739f958442513ff76674 (diff)
downloadblog-f928a9cb3a4f2161a58f8f7ad86d8e98d0808c26.tar.gz
Add workflow for GitHub
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/hugo.yml36
1 files changed, 36 insertions, 0 deletions
diff --git a/.github/workflows/hugo.yml b/.github/workflows/hugo.yml
new file mode 100644
index 0000000..7a272ec
--- /dev/null
+++ b/.github/workflows/hugo.yml
@@ -0,0 +1,36 @@
+name: Hugo build
+
+on:
+  push:
+    branches: [ master ]
+    pull_request:
+      branches: [ master ]
+
+    workflow_dispatch:
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v2
+      - name: Build webring
+        run: |
+          git clone https://git.sr.ht/~sircmpwn/openring
+          cd openring
+          go build -o openring
+          sudo cp openring /usr/local/bin/
+          cd ..
+          ./create-webring.sh
+
+      - name: Reconfig
+        run: sed -i "s/huyngo.srht.site/huy-ngo.github.io/" config.toml
+
+      - name: Hugo Build
+        uses: jakejarvis/hugo-build-action@v0.82.0
+
+      - name: Deploy 🚀
+        uses: JamesIves/github-pages-deploy-action@4.1.1
+        with:
+          branch: gh-pages # The branch the action should deploy to.
+          folder: public # The folder the action should deploy.