Skip to content

Commit d5adce9

Browse files
ci: only attempt to deploy the built documentation in the upstream repo
Only attempt to deploy the documentation when running in the zephyrproject-rtos/example-application repository. This avoid deployment failure for downstream forks with CI enabled. Signed-off-by: Henrik Brix Andersen <[email protected]>
1 parent 17b35b9 commit d5adce9

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

.github/workflows/docs.yml

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,25 +34,33 @@ jobs:
3434
mv _build_sphinx/html/* deploy
3535
3636
- name: Setup pages
37-
if: github.event_name != 'pull_request'
37+
if: |
38+
github.event_name != 'pull_request' &&
39+
github.repository == 'zephyrproject-rtos/example-application'
3840
uses: actions/configure-pages@v4
3941

4042
- name: Upload pages artifact
41-
if: github.event_name != 'pull_request'
43+
if: |
44+
github.event_name != 'pull_request' &&
45+
github.repository == 'zephyrproject-rtos/example-application'
4246
uses: actions/upload-pages-artifact@v3
4347
with:
4448
path: doc/deploy
4549

4650
- name: Upload artifacts
47-
if: github.event_name == 'pull_request'
51+
if: |
52+
github.event_name == 'pull_request' &&
53+
github.repository == 'zephyrproject-rtos/example-application'
4854
uses: actions/upload-artifact@v4
4955
with:
5056
path: doc/deploy
5157

5258
deploy:
5359
runs-on: ubuntu-22.04
5460
needs: build
55-
if: github.event_name != 'pull_request'
61+
if: |
62+
github.event_name != 'pull_request' &&
63+
github.repository == 'zephyrproject-rtos/example-application'
5664
permissions:
5765
pages: write
5866
id-token: write

0 commit comments

Comments
 (0)