Skip to content

Commit c7b24fb

Browse files
authored
Update the docs deployment workflow
1 parent fc524e9 commit c7b24fb

1 file changed

Lines changed: 32 additions & 4 deletions

File tree

.github/workflows/docs.yml

Lines changed: 32 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,58 @@ on:
1313
# Allows you to run this workflow manually from the Actions tab
1414
workflow_dispatch:
1515

16+
# Add permissions for GitHub Pages deployment
17+
permissions:
18+
contents: read
19+
pages: write
20+
id-token: write
21+
22+
# Allow only one concurrent deployment
23+
concurrency:
24+
group: "pages"
25+
cancel-in-progress: false
26+
1627
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
1728
jobs:
1829
# This workflow contains a single job called "build"
19-
build-and-deploy:
30+
build-and-upload:
2031
# The type of runner that the job will run on
2132
runs-on: ubuntu-latest
2233

2334
# Steps represent a sequence of tasks that will be executed as part of the job
2435
steps:
2536
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
2637
- uses: actions/checkout@v4
27-
- name: Set up Python ${{ matrix.python-version }}
38+
39+
- name: Set up Python
2840
uses: actions/setup-python@v4
2941
with:
3042
python-version: '3.x'
3143

3244
# Runs a single command using the runners shell
3345
- name: Install dependencies
34-
run: pip install sphinx sphinx-book-theme
46+
run: |
47+
pip install sphinx sphinx-book-theme
48+
pip install -e ./streamdaq
3549
3650
- name: Build docs
3751
run: sphinx-build -b html ./docs/ ./docs/_build
3852

39-
- name: Deploy docs
53+
- name: Setup Pages
54+
uses: actions/configure-pages@v4
55+
56+
- name: Upload artifact
4057
uses: actions/upload-pages-artifact@v3
4158
with:
4259
path: docs/_build
60+
# Deployment job
61+
deploy:
62+
environment:
63+
name: github-pages
64+
url: ${{ steps.deployment.outputs.page_url }}
65+
runs-on: ubuntu-latest
66+
needs: build-and-upload
67+
steps:
68+
- name: Deploy to GitHub Pages
69+
id: deployment
70+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)