Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/reuixiy/hugo-theme-meme.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorreuixiy <reuixiy@gmail.com>2022-03-14 14:19:15 +0300
committerGitHub <noreply@github.com>2022-03-14 14:19:15 +0300
commit8e0d1b56a711ed26495465283ba12ed55ad15d8b (patch)
tree1896ca4e4b294ffbb43624b4f221155d2c5295ad
parente4258903032a6a6b3b27ca3603652c11b167ace3 (diff)
feat: set up github actions for pages (#278)
Updates #277
-rw-r--r--.github/workflows/ci.yml51
1 files changed, 51 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 0000000..e46716c
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,51 @@
+# .github/workflows/ci.yml
+
+name: ci
+
+on:
+ push:
+ branches:
+ - master
+
+jobs:
+ build:
+ runs-on: ubuntu-latest
+
+ steps:
+ - name: 'Clone gohugoio/hugoBasicExample repository'
+ run: |
+ git clone https://github.com/gohugoio/hugoBasicExample.git
+ cd hugoBasicExample
+ mv content/post content/posts
+ sed -i 's/posts/post/g' content/posts/_index.md
+ mkdir content/about && mv content/about.md content/about/_index.md
+ mkdir -p themes/meme
+
+ - name: 'Check out MemE into themes/meme folder'
+ uses: actions/checkout@v2
+ with:
+ path: hugoBasicExample/themes/meme
+
+ - name: 'Setup MemE'
+ run: |
+ cd hugoBasicExample
+ rm -rf config*
+ cp themes/meme/exampleSite/config.toml .
+
+ - name: 'Install Hugo'
+ uses: peaceiris/actions-hugo@v2
+ with:
+ hugo-version: latest
+ extended: true
+
+ - name: 'Build site'
+ run: |
+ cd hugoBasicExample
+ hugo --gc --minify --cleanDestinationDir --baseURL="https://io-oi.me/hugo-theme-meme/"
+
+ - name: 'Deploy to GitHub Pages'
+ uses: peaceiris/actions-gh-pages@v3
+ with:
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: hugoBasicExample/public
+ force_orphan: true