Skip to content

Commit 0ea2bc4

Browse files
committed
fix: deploy docs after CI has ran.
1 parent f5301c8 commit 0ea2bc4

File tree

1 file changed

+17
-8
lines changed

1 file changed

+17
-8
lines changed

.github/workflows/docs.yml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ name: docs
22

33
on:
44
workflow_dispatch:
5-
6-
push:
7-
branches: [ "master" ]
8-
# pull_request:
9-
# branches: [ "master" ]
5+
6+
workflow_run:
7+
workflows: ["CI"]
8+
types:
9+
- completed
10+
# push:
11+
# branches: [ "master" ]
1012
issue_comment:
1113
types: [created]
1214

@@ -20,7 +22,7 @@ env:
2022

2123
jobs:
2224
build-docs:
23-
if: ${{ ( contains(github.event.comment.body, '/build-docs') && github.event.issue.pull_request ) || github.event_name == 'push' || github.event_name == 'workflow_dispatch'}}
25+
if: ${{ ( contains(github.event.comment.body, '/build-docs') && github.event.issue.pull_request ) || github.event_name == 'workflow_run' || github.event_name == 'workflow_dispatch'}}
2426
name: Build API Documentation
2527
runs-on: gpu
2628
permissions:
@@ -92,17 +94,24 @@ jobs:
9294
name: Deploy API Documentation
9395
runs-on: ubuntu-latest
9496
needs: build-docs
95-
if: ${{ github.event_name == 'push' }}
97+
if: ${{ github.event_name == 'workflow_run' }}
9698

9799
steps:
98100
- name: Get the docs_build artifact
99101
uses: actions/download-artifact@v4
100102
with:
101103
name: docs
102104
path: docs_build
103-
run-id: ${{ github.event.workflow_run.id }}
104105
github-token: ${{ secrets.GITHUB_TOKEN }}
105106

107+
- name: Get the coverage badge from CI
108+
uses: actions/download-artifact@v4
109+
with:
110+
name: coverage_badge
111+
path: docs_build/_static
112+
run-id: ${{ github.event.workflow_run.id}}
113+
github_token: ${{ secrets.GITHUB_TOKEN }}
114+
106115
- name: Display structure of docs
107116
run: ls -R docs_build/
108117

0 commit comments

Comments
 (0)