summaryrefslogtreecommitdiffstats
path: root/.github
diff options
context:
space:
mode:
authorSerghei Iakovlev <egrep@protonmail.ch>2022-04-29 21:39:20 +0200
committerSerghei Iakovlev <egrep@protonmail.ch>2022-04-29 21:39:20 +0200
commitade3ec089b6b68c23b6bfb5562f2077672779042 (patch)
treef5c457ca024699e2b7fbeab666d04d7f3d5af405 /.github
parente724eb147c164804118b798cd2ff7563a8236e34 (diff)
downloadgohugo-theme-ed-ade3ec089b6b68c23b6bfb5562f2077672779042.tar.gz
Setup Build GH-Pages
Diffstat (limited to '.github')
-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