Skip to content

Commit 6ce048e

Browse files
authored
Merge pull request #138 from python-project-templates/tkp/jsup2
Rely on artifacts from build in docs
2 parents 2ac7460 + 3560336 commit 6ce048e

File tree

7 files changed

+212
-44
lines changed

7 files changed

+212
-44
lines changed

cpp/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,46 @@
11
name: Publish Docs
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
workflow_run:
5+
workflows: ["Build Status"]
6+
branches: [main]
7+
types: [completed]
78
workflow_dispatch:
9+
810
permissions:
11+
actions: read
912
contents: write
13+
1014
jobs:
1115
docs:
1216
runs-on: ubuntu-latest
17+
if: {% raw %}${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}{% endraw %}
1318
steps:
1419
- uses: actions/checkout@v6
1520
- uses: actions-ext/python/setup@main
16-
- run: uv pip install .[develop]
17-
- run: uv pip install yardang
21+
22+
- name: Download dist from build
23+
uses: actions/download-artifact@v7
24+
with:
25+
name: dist-ubuntu-latest-{{python_version_primary}}
26+
path: dist
27+
run-id: {% raw %}${{ github.event.workflow_run.id }}{% endraw %}
28+
if: github.event_name == 'workflow_run'
29+
30+
- name: Install from wheel
31+
run: |
32+
uv pip install dist/*.whl
33+
uv pip install yardang
34+
if: github.event_name == 'workflow_run'
35+
36+
- name: Install from source (manual trigger)
37+
run: |
38+
uv pip install .[develop]
39+
uv pip install yardang
40+
if: github.event_name == 'workflow_dispatch'
41+
1842
- run: yardang build
43+
1944
- uses: peaceiris/actions-gh-pages@v4
2045
with:
2146
publish_branch: gh-pages

cppjswasm/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,47 @@
11
name: Publish Docs
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
workflow_run:
5+
workflows: ["Build Status"]
6+
branches: [main]
7+
types: [completed]
78
workflow_dispatch:
9+
810
permissions:
11+
actions: read
912
contents: write
13+
1014
jobs:
1115
docs:
1216
runs-on: ubuntu-latest
17+
if: {% raw %}${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}{% endraw %}
1318
steps:
1419
- uses: actions/checkout@v6
1520
- uses: actions-ext/python/setup@main
16-
- uses: actions-ext/node/setup@main
17-
- uses: mymindstorm/setup-emsdk@v16
18-
- run: make develop
19-
- run: uv pip install .
20-
- run: uv pip install yardang
21+
22+
- name: Download dist from build
23+
uses: actions/download-artifact@v7
24+
with:
25+
name: dist-ubuntu-latest-{{python_version_primary}}
26+
path: dist
27+
run-id: {% raw %}${{ github.event.workflow_run.id }}{% endraw %}
28+
if: github.event_name == 'workflow_run'
29+
30+
- name: Install from wheel
31+
run: |
32+
uv pip install dist/*.whl
33+
uv pip install yardang
34+
if: github.event_name == 'workflow_run'
35+
36+
- name: Install from source (manual trigger)
37+
run: |
38+
make develop
39+
uv pip install .
40+
uv pip install yardang
41+
if: github.event_name == 'workflow_dispatch'
42+
2143
- run: yardang build
44+
2245
- uses: peaceiris/actions-gh-pages@v4
2346
with:
2447
publish_branch: gh-pages

js/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,46 @@
11
name: Publish Docs
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
workflow_run:
5+
workflows: ["Build Status"]
6+
branches: [main]
7+
types: [completed]
78
workflow_dispatch:
9+
810
permissions:
11+
actions: read
912
contents: write
13+
1014
jobs:
1115
docs:
1216
runs-on: ubuntu-latest
17+
if: {% raw %}${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}{% endraw %}
1318
steps:
1419
- uses: actions/checkout@v6
1520
- uses: actions-ext/python/setup@main
16-
- uses: actions-ext/node/setup@main
17-
- run: uv pip install .[develop]
18-
- run: uv pip install yardang
21+
22+
- name: Download dist from build
23+
uses: actions/download-artifact@v7
24+
with:
25+
name: dist-ubuntu-latest
26+
path: dist
27+
run-id: {% raw %}${{ github.event.workflow_run.id }}{% endraw %}
28+
if: github.event_name == 'workflow_run'
29+
30+
- name: Install from wheel
31+
run: |
32+
uv pip install dist/*.whl
33+
uv pip install yardang
34+
if: github.event_name == 'workflow_run'
35+
36+
- name: Install from source (manual trigger)
37+
run: |
38+
uv pip install .[develop]
39+
uv pip install yardang
40+
if: github.event_name == 'workflow_dispatch'
41+
1942
- run: yardang build
43+
2044
- uses: peaceiris/actions-gh-pages@v4
2145
with:
2246
publish_branch: gh-pages

jupyter/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,46 @@
11
name: Publish Docs
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
workflow_run:
5+
workflows: ["Build Status"]
6+
branches: [main]
7+
types: [completed]
78
workflow_dispatch:
9+
810
permissions:
11+
actions: read
912
contents: write
13+
1014
jobs:
1115
docs:
1216
runs-on: ubuntu-latest
17+
if: {% raw %}${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}{% endraw %}
1318
steps:
1419
- uses: actions/checkout@v6
1520
- uses: actions-ext/python/setup@main
16-
- uses: actions-ext/node/setup@main
17-
- run: uv pip install .[develop]
18-
- run: uv pip install yardang
21+
22+
- name: Download dist from build
23+
uses: actions/download-artifact@v7
24+
with:
25+
name: dist-ubuntu-latest
26+
path: dist
27+
run-id: {% raw %}${{ github.event.workflow_run.id }}{% endraw %}
28+
if: github.event_name == 'workflow_run'
29+
30+
- name: Install from wheel
31+
run: |
32+
uv pip install dist/*.whl
33+
uv pip install yardang
34+
if: github.event_name == 'workflow_run'
35+
36+
- name: Install from source (manual trigger)
37+
run: |
38+
uv pip install .[develop]
39+
uv pip install yardang
40+
if: github.event_name == 'workflow_dispatch'
41+
1942
- run: yardang build
43+
2044
- uses: peaceiris/actions-gh-pages@v4
2145
with:
2246
publish_branch: gh-pages

python/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,46 @@
11
name: Publish Docs
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
workflow_run:
5+
workflows: ["Build Status"]
6+
branches: [main]
7+
types: [completed]
78
workflow_dispatch:
9+
810
permissions:
11+
actions: read
912
contents: write
13+
1014
jobs:
1115
docs:
1216
runs-on: ubuntu-latest
17+
if: {% raw %}${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}{% endraw %}
1318
steps:
1419
- uses: actions/checkout@v6
1520
- uses: actions-ext/python/setup@main
16-
- run: uv pip install .[develop]
17-
- run: uv pip install yardang
21+
22+
- name: Download dist from build
23+
uses: actions/download-artifact@v7
24+
with:
25+
name: dist-ubuntu-latest
26+
path: dist
27+
run-id: {% raw %}${{ github.event.workflow_run.id }}{% endraw %}
28+
if: github.event_name == 'workflow_run'
29+
30+
- name: Install from wheel
31+
run: |
32+
uv pip install dist/*.whl
33+
uv pip install yardang
34+
if: github.event_name == 'workflow_run'
35+
36+
- name: Install from source (manual trigger)
37+
run: |
38+
uv pip install .[develop]
39+
uv pip install yardang
40+
if: github.event_name == 'workflow_dispatch'
41+
1842
- run: yardang build
43+
1944
- uses: peaceiris/actions-gh-pages@v4
2045
with:
2146
publish_branch: gh-pages

rust/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,46 @@
11
name: Publish Docs
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
workflow_run:
5+
workflows: ["Build Status"]
6+
branches: [main]
7+
types: [completed]
78
workflow_dispatch:
9+
810
permissions:
11+
actions: read
912
contents: write
13+
1014
jobs:
1115
docs:
1216
runs-on: ubuntu-latest
17+
if: {% raw %}${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}{% endraw %}
1318
steps:
1419
- uses: actions/checkout@v6
1520
- uses: actions-ext/python/setup@main
16-
- uses: actions-ext/rust/setup@main
17-
- run: uv pip install .[develop]
18-
- run: uv pip install yardang
21+
22+
- name: Download dist from build
23+
uses: actions/download-artifact@v7
24+
with:
25+
name: dist-ubuntu-latest
26+
path: dist
27+
run-id: {% raw %}${{ github.event.workflow_run.id }}{% endraw %}
28+
if: github.event_name == 'workflow_run'
29+
30+
- name: Install from wheel
31+
run: |
32+
uv pip install dist/*.whl
33+
uv pip install yardang
34+
if: github.event_name == 'workflow_run'
35+
36+
- name: Install from source (manual trigger)
37+
run: |
38+
uv pip install .[develop]
39+
uv pip install yardang
40+
if: github.event_name == 'workflow_dispatch'
41+
1942
- run: yardang build
43+
2044
- uses: peaceiris/actions-gh-pages@v4
2145
with:
2246
publish_branch: gh-pages

rustjswasm/.github/workflows/{% if add_docs %}docs.yaml{% endif %}.jinja

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,47 @@
11
name: Publish Docs
22

33
on:
4-
push:
5-
branches:
6-
- main
4+
workflow_run:
5+
workflows: ["Build Status"]
6+
branches: [main]
7+
types: [completed]
78
workflow_dispatch:
9+
810
permissions:
11+
actions: read
912
contents: write
13+
1014
jobs:
1115
docs:
1216
runs-on: ubuntu-latest
17+
if: {% raw %}${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}{% endraw %}
1318
steps:
1419
- uses: actions/checkout@v6
1520
- uses: actions-ext/python/setup@main
16-
- uses: actions-ext/rust/setup@main
17-
- uses: actions-ext/node/setup@main
18-
- run: make develop
19-
- run: uv pip install .
20-
- run: uv pip install yardang
21+
22+
- name: Download dist from build
23+
uses: actions/download-artifact@v7
24+
with:
25+
name: dist-ubuntu-latest
26+
path: dist
27+
run-id: {% raw %}${{ github.event.workflow_run.id }}{% endraw %}
28+
if: github.event_name == 'workflow_run'
29+
30+
- name: Install from wheel
31+
run: |
32+
uv pip install dist/*.whl
33+
uv pip install yardang
34+
if: github.event_name == 'workflow_run'
35+
36+
- name: Install from source (manual trigger)
37+
run: |
38+
make develop
39+
uv pip install .
40+
uv pip install yardang
41+
if: github.event_name == 'workflow_dispatch'
42+
2143
- run: yardang build
44+
2245
- uses: peaceiris/actions-gh-pages@v4
2346
with:
2447
publish_branch: gh-pages

0 commit comments

Comments
 (0)