OSDN Git Service

[add] : Added blog script
authorhayao <hayao@fascode.net>
Sat, 9 Oct 2021 12:46:45 +0000 (21:46 +0900)
committerhayao <hayao@fascode.net>
Sat, 9 Oct 2021 12:46:45 +0000 (21:46 +0900)
.github/workflows/hugo.yaml
update-blog.sh [new file with mode: 0644]

index d1c8060..546fe85 100644 (file)
@@ -20,11 +20,11 @@ jobs:
           extended: true
 
       - name: Build
-        run: cd blog; hugo --minify
+        run: ./update-blog,sh
 
       - name: Deploy
         uses: peaceiris/actions-gh-pages@v3
         with:
           github_token: ${{ secrets.GITHUB_TOKEN }}
           publish_branch: gh-pages
-          publish_dir: ./public
+
diff --git a/update-blog.sh b/update-blog.sh
new file mode 100644 (file)
index 0000000..e2649e7
--- /dev/null
@@ -0,0 +1,6 @@
+#!/usr/bin/env bash
+set -eu
+
+script_path="$( cd -P "$( dirname "$(readlink -f "${0}")" )" && pwd )"
+cd "${script_path}/blog"
+hugo --minify