diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml new file mode 100644 index 0000000..d816bf5 --- /dev/null +++ b/.github/workflows/build-and-deploy.yml @@ -0,0 +1,49 @@ +name: Build and Deploy + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + + container: + image: registry.gitlab.com/pages/hugo/hugo_extended:latest + + env: + GIT_SUBMODULE_STRATEGY: recursive + HUGO_ENV: production + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + submodules: recursive + + - name: Install dependencies + run: | + sudo apt-get update + sudo apt-get install -y git + + - name: Build + run: hugo + + deploy: + runs-on: ubuntu-latest + needs: build + if: github.ref == 'refs/heads/master' + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Deploy to GitHub Pages + run: hugo + + - name: Upload artifacts + uses: actions/upload-artifact@v2 + with: + name: public + path: public \ No newline at end of file