mirror of
https://github.com/Mayuri-Chan/pyrofork.git
synced 2025-12-29 12:04:51 +00:00
workflows: build docs if theres any changes in docs directory
Signed-off-by: wulan17 <wulan17@nusantararom.org>
This commit is contained in:
parent
5de44baff4
commit
ed19fee93d
2 changed files with 19 additions and 1 deletions
18
.github/workflows/build-docs-dir.yml
vendored
Normal file
18
.github/workflows/build-docs-dir.yml
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
name: Build-docs
|
||||
|
||||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'docs/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-22.04
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Build
|
||||
run: bash build-docs.sh
|
||||
env:
|
||||
DOCS_KEY: ${{ secrets.DOCS_KEY }}
|
||||
|
|
@ -3,7 +3,7 @@ export DOCS_KEY
|
|||
VENV="$(pwd)"/venv
|
||||
export VENV
|
||||
|
||||
if [[ "$(echo "$GITHUB_REF" | cut -d '/' -f "1 2")" == "refs/tags" ]]; then
|
||||
if [[ "$(echo "$GITHUB_REF" | cut -d '/' -f "1 2")" == "refs/tags" ]] || [[ "$GITHUB_REF" == "refs/heads/main" ]]; then
|
||||
branch="main"
|
||||
elif [[ "$GITHUB_REF" == "refs/heads/staging" ]]; then
|
||||
branch="staging"
|
||||
|
|
|
|||
Loading…
Reference in a new issue