OSDN Git Service

Revert "[remove] : Removed github workflow"
authorhayao <hayao@fascode.net>
Sat, 9 Oct 2021 14:11:04 +0000 (23:11 +0900)
committerhayao <hayao@fascode.net>
Sat, 9 Oct 2021 14:48:56 +0000 (23:48 +0900)
This reverts commit 6a7c5a0cd4d8f1f12da02e775c330cebace5cd59.

.github/workflows/hugo.yaml [new file with mode: 0644]

diff --git a/.github/workflows/hugo.yaml b/.github/workflows/hugo.yaml
new file mode 100644 (file)
index 0000000..4d0355e
--- /dev/null
@@ -0,0 +1,33 @@
+name: Hugo
+
+on: push
+
+jobs:
+  gh-pages:
+    runs-on: ubuntu-latest
+    steps:
+      - name: Checkout
+        uses: actions/checkout@v2
+        with:
+          submodules: true
+          fetch-depth: 0 
+
+      # https://github.com/marketplace/actions/github-pages-action
+      - name: Setup
+        uses: peaceiris/actions-hugo@v2
+        with:
+          hugo-version: '0.88.1'
+          extended: true
+
+      - name: Build
+        working-directory: ./blog
+        #run: ./update-blog,sh
+        run: hugo --minify
+
+      - name: Deploy
+        uses: peaceiris/actions-gh-pages@v3
+        with:
+          github_token: ${{ secrets.GITHUB_TOKEN }}
+          publish_branch: public
+          publish_dir: ./
+