mirror of
https://github.com/getzola/zola
synced 2024-11-10 06:14:19 +00:00
3d0749d478
* fix: fix docs CI workflow; build in MRs; build and deploy on master * fix: set link checker to warn, not error, for site in docs/
35 lines
779 B
YAML
35 lines
779 B
YAML
name: Build and deploy GH Pages
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
if: github.ref != 'refs/heads/master'
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v4
|
|
- name: build
|
|
uses: shalzz/zola-deploy-action@v0.18.0
|
|
env:
|
|
BUILD_DIR: docs/
|
|
BUILD_ONLY: true
|
|
|
|
build_and_deploy:
|
|
runs-on: ubuntu-latest
|
|
if: github.ref == 'refs/heads/master'
|
|
steps:
|
|
- name: checkout
|
|
uses: actions/checkout@v4
|
|
- name: build_and_deploy
|
|
uses: shalzz/zola-deploy-action@v0.18.0
|
|
env:
|
|
PAGES_BRANCH: gh-pages
|
|
BUILD_DIR: docs/
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|