diff options
-rw-r--r-- | .github/workflows/ci.yml | 51 |
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 |