Skip to content

Commit e2acb55

Browse files
committed
Separate docs build and deploy into separate workflows
This should remove the annoying "@asmeurer deployed to docs-build-and-deploy 10 minutes ago — with GitHub Actions" after every single commit in the pull request timeline.
1 parent 8606188 commit e2acb55

File tree

3 files changed

+49
-31
lines changed

3 files changed

+49
-31
lines changed

.github/workflows/build-docs.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Docs Build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
- uses: actions/setup-python@v5
11+
- name: Install Dependencies
12+
run: |
13+
python -m pip install -r docs/requirements.txt
14+
- name: Build Docs
15+
run: |
16+
cd docs
17+
make html
18+
- name: Upload Artifact
19+
uses: actions/upload-artifact@v4
20+
with:
21+
name: docs-build
22+
path: docs/_build/html

.github/workflows/deploy-docs.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Docs Deploy
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
environment:
12+
name: docs-deploy
13+
steps:
14+
- name: Download Artifact
15+
uses: actions/download-artifact@v4
16+
with:
17+
name: docs-build
18+
19+
# Note, the gh-pages deployment requires setting up a SSH deploy key.
20+
# See
21+
# https://github.com/JamesIves/github-pages-deploy-action/tree/dev#using-an-ssh-deploy-key-
22+
- name: Deploy
23+
uses: JamesIves/github-pages-deploy-action@v4
24+
with:
25+
folder: .
26+
ssh-key: ${{ secrets.DEPLOY_KEY }}
27+
force: no

.github/workflows/docs.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

0 commit comments

Comments
 (0)