Skip to content

Commit

Permalink
fix: fix docs CI workflow; build in MRs; build and deploy on master
Browse files Browse the repository at this point in the history
  • Loading branch information
iamorphen committed May 22, 2024
1 parent b0eacbc commit 9dcd748
Showing 1 changed file with 20 additions and 3 deletions.
23 changes: 20 additions & 3 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,35 @@
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/[email protected]
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@v3.0.0
uses: actions/checkout@v4
- name: build_and_deploy
uses: shalzz/zola-deploy-action@v0.17.2
uses: shalzz/zola-deploy-action@v0.18.0
env:
PAGES_BRANCH: gh-pages
BUILD_DIR: docs/
TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 9dcd748

Please sign in to comment.