summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.github/workflows/cd.yml44
1 files changed, 44 insertions, 0 deletions
diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml
new file mode 100644
index 0000000..b285fc9
--- /dev/null
+++ b/.github/workflows/cd.yml
@@ -0,0 +1,44 @@
+name: CD
+
+on:
+ push:
+ paths-ignore:
+ - "LICENSE"
+ - "README.md"
+ branches:
+ - master
+ - exampleSite
+ workflow_dispatch:
+ # manual run
+ inputs:
+ hugoVersion:
+ description: "Hugo Version"
+ required: false
+ default: "0.84.0"
+
+jobs:
+ deploy:
+ runs-on: ubuntu-20.04
+ name: Build GH-Pages
+ concurrency:
+ group: ${{ github.workflow }}-${{ github.ref }}
+
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v3
+ with:
+ ref: exampleSite
+
+ - name: Setup hugo
+ uses: peaceiris/actions-hugo@v2
+ with:
+ hugo-version: "${{ github.event.inputs.hugoVersion }}"
+
+ - name: Build
+ run: hugo --source=exampleSite --buildDrafts --gc --verbose --minify
+
+ - name: Deploy
+ uses: peaceiris/actions-gh-pages@v3
+ with:
+ github_token: ${{ secrets.TOKEN }}
+ publish_dir: ./public