Skip to content

Commit 24cbeeb

Browse files
authored
Merge pull request #26 from FGRCL/pages-docs
add a workflow job to build and publish the docs webstie
2 parents b1c12da + f2457fe commit 24cbeeb

1 file changed

Lines changed: 31 additions & 2 deletions

File tree

.github/workflows/publish-test.yaml

Lines changed: 31 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ on:
1111
- completed
1212

1313
jobs:
14-
publish-test:
15-
14+
publish-package:
1615
runs-on: ubuntu-latest
1716
if: ${{ github.event.workflow_run.conclusion == 'success' }}
1817
strategy:
@@ -33,3 +32,33 @@ jobs:
3332
- name: publish
3433
run: |
3534
pdm publish --repository https://test.pypi.org/legacy/
35+
36+
37+
publish-docs:
38+
runs-on: ubuntu-latest
39+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
40+
strategy:
41+
matrix:
42+
python-version: [ "3.10" ]
43+
permissions:
44+
id-token: write
45+
steps:
46+
- uses: actions/checkout@v4
47+
- name: set up python ${{ matrix.python-version }}
48+
uses: pdm-project/setup-pdm@v4
49+
with:
50+
python-version: ${{ matrix.python-version }}
51+
cache: true
52+
- name: install dependencies
53+
run: |
54+
pdm install --global --project .
55+
- name: build docs
56+
run: |
57+
pdm run docs
58+
- name: Upload artifact
59+
uses: actions/upload-pages-artifact@v3
60+
with:
61+
path: 'docs/_build/html'
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)