-
Notifications
You must be signed in to change notification settings - Fork 48
48 lines (40 loc) · 1.06 KB
/
build-and-deploy-doc.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
name: "Build and deploy documentation"
on:
push:
paths:
- doc/**
- .github/workflows/**
pull_request:
paths:
- doc/**
- .github/workflows/**
workflow_dispatch:
inputs:
perform_deploy:
description: 'Perform deploy to GitHub Pages branch'
required: true
default: false
type: boolean
jobs:
doc-build-and-deploy:
name: Build and deploy documentation
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Build documentation
uses: ammaraskar/[email protected]
with:
docs-folder: doc
- name: Deploy documentation
if: ${{ github.event_name == 'workflow_dispatch' && inputs.perform_deploy }}
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: doc/_build/html
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: html_doc
path: doc/_build/html
retention-days: 7