Skip to content

Commit 7ae1f89

Browse files
authored
DEVOPS-780 feat: add GitHub Actions workflow for deploying documentation to GitHub Pages (#15)
* DEVOPS-780 feat: add GitHub Actions workflow for deploying documentation to GitHub Pages * feat: add pull request trigger for documentation deployment workflow * Revert "feat: add pull request trigger for documentation deployment workflow" This reverts commit 656fa48.
1 parent f614553 commit 7ae1f89

1 file changed

Lines changed: 68 additions & 0 deletions

File tree

.github/workflows/docs.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Deploy Docs
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "docs/**"
9+
- "cumulusci/**"
10+
- ".github/workflows/docs.yml"
11+
workflow_dispatch:
12+
13+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
14+
permissions:
15+
contents: read
16+
pages: write
17+
id-token: write
18+
19+
# Allow only one concurrent deployment
20+
concurrency:
21+
group: pages
22+
cancel-in-progress: true
23+
24+
jobs:
25+
build:
26+
name: Build Docs
27+
runs-on: ubuntu-latest
28+
steps:
29+
- name: Checkout
30+
uses: actions/checkout@v4
31+
with:
32+
fetch-depth: 0
33+
34+
- name: Set up Python 3.11
35+
uses: actions/setup-python@v4
36+
with:
37+
python-version: "3.11"
38+
39+
- name: Set up uv
40+
uses: SFDO-Tooling/setup-uv@main
41+
with:
42+
version: "0.8.4"
43+
enable-cache: true
44+
45+
- name: Install dependencies
46+
run: uv sync --group docs
47+
48+
- name: Build Docs
49+
run: |
50+
cd docs
51+
uv run sphinx-build -b html . ./_build/html
52+
53+
- name: Upload artifact
54+
uses: actions/upload-pages-artifact@v4.0.0
55+
with:
56+
path: docs/_build/html
57+
58+
deploy:
59+
name: Deploy to GitHub Pages
60+
needs: build
61+
runs-on: ubuntu-latest
62+
environment:
63+
name: github-pages
64+
url: ${{ steps.deployment.outputs.page_url }}
65+
steps:
66+
- name: Deploy to GitHub Pages
67+
id: deployment
68+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)