Skip to content

Commit 783a953

Browse files
committed
Update build-doc.yml
1 parent 52a0d06 commit 783a953

File tree

1 file changed

+18
-22
lines changed

1 file changed

+18
-22
lines changed

.github/workflows/build-doc.yml

Lines changed: 18 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,8 @@ name: Build Documentation
33
on:
44
push:
55
branches:
6-
- migrate-to-gh-actions
6+
- doc-prod
77
pull_request:
8-
branches:
9-
- migrate-to-gh-actions
108

119
jobs:
1210
build-doc:
@@ -62,10 +60,8 @@ jobs:
6260
name: doc-html
6361
path: doc/build/html/
6462

65-
# Deploy steps — currently using test branches for validation
66-
# TODO: Change branch trigger to 'doc-prod' and deploy branches to 'built', 'built_ipynb', 'gh-pages'
6763
- name: Create GitHub App token
68-
if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push'
64+
if: github.ref_name == 'doc-prod' && github.event_name == 'push'
6965
uses: actions/create-github-app-token@v2
7066
id: app-token
7167
with:
@@ -74,17 +70,17 @@ jobs:
7470
owner: ${{ github.repository_owner }}
7571
repositories: plotly.py-docs,graphing-library-docs
7672

77-
- name: Checkout plotly.py-docs (built-test)
78-
if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push'
73+
- name: Checkout plotly.py-docs (built)
74+
if: github.ref_name == 'doc-prod' && github.event_name == 'push'
7975
uses: actions/checkout@v6
8076
with:
8177
repository: plotly/plotly.py-docs
82-
ref: built-test
78+
ref: built
8379
token: ${{ steps.app-token.outputs.token }}
8480
path: plotly.py-docs-html
8581

8682
- name: Deploy HTML docs
87-
if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push'
83+
if: github.ref_name == 'doc-prod' && github.event_name == 'push'
8884
run: |
8985
git config --global user.name plotlydocbot
9086
git config --global user.email [email protected]
@@ -95,17 +91,17 @@ jobs:
9591
git commit -m "build of https://github.com/plotly/plotly.py/commit/${{ github.sha }}" || echo "No changes to commit"
9692
git push --force
9793
98-
- name: Checkout plotly.py-docs (built_ipynb-test)
99-
if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push'
94+
- name: Checkout plotly.py-docs (built_ipynb)
95+
if: github.ref_name == 'doc-prod' && github.event_name == 'push'
10096
uses: actions/checkout@v6
10197
with:
10298
repository: plotly/plotly.py-docs
103-
ref: built_ipynb-test
99+
ref: built_ipynb
104100
token: ${{ steps.app-token.outputs.token }}
105101
path: plotly.py-docs-ipynb
106102

107103
- name: Deploy notebooks
108-
if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push'
104+
if: github.ref_name == 'doc-prod' && github.event_name == 'push'
109105
run: |
110106
rm -rf plotly.py-docs-ipynb/*
111107
cp -r doc/build/ipynb/* plotly.py-docs-ipynb/
@@ -115,23 +111,23 @@ jobs:
115111
git push --force
116112
117113
- name: Checkout graphing-library-docs
118-
if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push'
114+
if: github.ref_name == 'doc-prod' && github.event_name == 'push'
119115
uses: actions/checkout@v6
120116
with:
121117
repository: plotly/graphing-library-docs
122-
ref: test-trigger
118+
ref: master
123119
token: ${{ steps.app-token.outputs.token }}
124120
path: graphing-library-docs
125121

126122
- name: Trigger downstream doc build
127-
if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push'
123+
if: github.ref_name == 'doc-prod' && github.event_name == 'push'
128124
run: |
129125
cd graphing-library-docs
130126
git commit --allow-empty -m "deploying https://github.com/plotly/plotly.py/commit/${{ github.sha }}"
131127
git push
132128
133129
- name: Build API docs
134-
if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push'
130+
if: github.ref_name == 'doc-prod' && github.event_name == 'push'
135131
run: |
136132
cd doc
137133
source .venv/bin/activate
@@ -143,17 +139,17 @@ jobs:
143139
cd apidoc
144140
make html
145141
146-
- name: Checkout plotly.py-docs (gh-pages-test)
147-
if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push'
142+
- name: Checkout plotly.py-docs (gh-pages)
143+
if: github.ref_name == 'doc-prod' && github.event_name == 'push'
148144
uses: actions/checkout@v6
149145
with:
150146
repository: plotly/plotly.py-docs
151-
ref: gh-pages-test
147+
ref: gh-pages
152148
token: ${{ steps.app-token.outputs.token }}
153149
path: plotly.py-docs-api
154150

155151
- name: Deploy API docs
156-
if: github.ref_name == 'migrate-to-gh-actions' && github.event_name == 'push'
152+
if: github.ref_name == 'doc-prod' && github.event_name == 'push'
157153
run: |
158154
rm -rf plotly.py-docs-api/*
159155
cp -r doc/apidoc/_build/html/* plotly.py-docs-api/

0 commit comments

Comments
 (0)