From 137977cf3c174a20d873419040b227d7c7db6a16 Mon Sep 17 00:00:00 2001 From: Jan Raasch Date: Thu, 9 Jul 2020 10:24:55 +0200 Subject: [PATCH] chore(ci): add github workflow --- .github/workflows/ci.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..3e0260a --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,32 @@ +name: CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-18.04 + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Hugo + uses: peaceiris/actions-hugo@v2 + with: + hugo-version: latest + + - name: Build local ./exampleSite + run: hugo --minify --gc --source ./exampleSite --baseURL https://janraasch.github.io/hugo-scroll/ + + - name: Deploy to GitHub Pages + if: github.event_name == 'push' && github.event.ref == 'master' + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./public