Skip to content

Commit 0d1a0b1

Browse files
committed
hotfix
1 parent 69c356d commit 0d1a0b1

File tree

1 file changed

+22
-27
lines changed

1 file changed

+22
-27
lines changed

.github/workflows/docs.yml

Lines changed: 22 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,9 @@ concurrency:
2020
cancel-in-progress: false
2121

2222
jobs:
23-
# This job handles the entire build and deploy process for GitHub Pages
24-
build-and-deploy-github:
25-
# This job runs on GitHub Actions, which is the default. We exclude Gitea.
26-
if: ${{ !env.GITEA_ACTIONS }}
23+
# Build job: builds the documentation and uploads it as an artifact.
24+
build:
2725
runs-on: ubuntu-latest
28-
environment:
29-
name: github-pages
30-
url: ${{ steps.deployment.outputs.page_url }}
3126
steps:
3227
- name: Checkout repository
3328
uses: actions/checkout@v4
@@ -44,39 +39,39 @@ jobs:
4439
- name: Build documentation
4540
run: sphinx-build -b html docs/source docs/build
4641

47-
- name: Upload artifact for GitHub Pages
48-
uses: actions/upload-pages-artifact@v1
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
4944
with:
5045
path: ./docs/build
5146

47+
# Deploy job for GitHub Pages
48+
deploy-github:
49+
needs: build
50+
if: ${{ vars.IS_GITEA != 'true' }}
51+
environment:
52+
name: github-pages
53+
url: ${{ steps.deployment.outputs.page_url }}
54+
runs-on: ubuntu-latest
55+
steps:
5256
- name: Deploy to GitHub Pages
5357
id: deployment
5458
uses: actions/deploy-pages@v4
5559

56-
# This job handles the entire build and deploy process for Gitea
57-
build-and-deploy-gitea:
58-
# This job only runs on Gitea Actions
59-
if: ${{ env.GITEA_ACTIONS == 'true' }}
60+
# Deploy job for Gitea
61+
deploy-gitea:
62+
needs: build
63+
if: ${{ vars.IS_GITEA == 'true' }}
6064
runs-on: ubuntu-latest
6165
steps:
62-
- name: Checkout repository
63-
uses: actions/checkout@v4
64-
65-
- name: Set up Python
66-
uses: actions/setup-python@v5
66+
- name: Download artifact
67+
uses: actions/download-artifact@v4
6768
with:
68-
python-version: '3.10'
69-
cache: 'pip'
70-
71-
- name: Install dependencies
72-
run: pip install -e .[docs]
73-
74-
- name: Build documentation
75-
run: sphinx-build -b html docs/source docs/build
69+
name: github-pages # This is the default artifact name for upload-pages-artifact
70+
path: ./docs-site
7671

7772
- name: Deploy to Gitea docs location
7873
run: |
7974
echo "Deploying documentation to Gitea's special directory..."
8075
# The '/pages' directory is a mounted volume on the Gitea runner for serving static content.
8176
sudo mkdir -p /pages/
82-
sudo cp -r ./docs/build/* /pages/
77+
sudo cp -r ./docs-site/* /pages/

0 commit comments

Comments
 (0)