From c4130502b5595596fe4ab901f7c9f6fa15c80939 Mon Sep 17 00:00:00 2001 From: Alekos Filini Date: Thu, 3 Dec 2020 14:18:33 +0100 Subject: [PATCH] Automatically publish to GitHub Pages --- .github/workflows/publish.yml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000000..425285cfe8 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,27 @@ +name: publish +on: + push: + branches: + - master + +jobs: + build: + name: Build and publish + runs-on: ubuntu-latest + env: + HUGO_VERSION: 0.79.0 + if: github.ref == 'refs/heads/master' + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: '0' + submodules: 'recursive' + - name: Configure git + run: git config user.email "github-actions@github.com" && git config user.name "github-actions" + - name: Install Hugo + run: curl -OL https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_${HUGO_VERSION}_Linux-64bit.deb && sudo dpkg -i hugo_${HUGO_VERSION}_Linux-64bit.deb && rm -v hugo_*.deb + - name: Run build + run: ./publish_to_ghpages.sh + - name: Push commit + run: cd public && git push origin gh-pages -- 2.49.0