Skip to content

Commit ea83d7e

Browse files
committed
Update build.yml
1 parent c86a1ed commit ea83d7e

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,32 @@ jobs:
101101
with:
102102
name: site-build
103103
path: _site/
104+
105+
- name: Create GitHub App token
106+
if: github.ref_name == 'update-ci' && github.repository == 'plotly/graphing-library-docs'
107+
uses: actions/create-github-app-token@v2
108+
id: app-token
109+
with:
110+
app-id: ${{ vars.DE_CI_GHAPP_ID }}
111+
private-key: ${{ secrets.DE_CI_GHAPP_PRIVATE_KEY }}
112+
owner: ${{ github.repository_owner }}
113+
114+
- name: Checkout documentation repo
115+
if: github.ref_name == 'update-ci' && github.repository == 'plotly/graphing-library-docs'
116+
uses: actions/checkout@v4
117+
with:
118+
repository: plotly/documentation
119+
ref: test-pages
120+
token: ${{ steps.app-token.outputs.token }}
121+
path: documentation
122+
123+
- name: Deploy to test branch
124+
if: github.ref_name == 'update-ci' && github.repository == 'plotly/graphing-library-docs'
125+
run: |
126+
git config --global user.email "accounts@plot.ly"
127+
git config --global user.name "plotlydocbot"
128+
cp -r _site/* documentation/
129+
cd documentation
130+
git add .
131+
git commit -m "deploying https://github.com/plotly/graphing-library-docs/commit/${{ github.sha }}" || echo "No changes to commit"
132+
git push

0 commit comments

Comments
 (0)