-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use ESMF_WEB_DEPLOY_KEY in build-esmpy-docs
- Loading branch information
1 parent
99d1bf3
commit f53a1b7
Showing
1 changed file
with
18 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -41,13 +41,19 @@ jobs: | |
with: | ||
name: esmpy-docs | ||
path: ${{ github.workspace }}/artifacts | ||
|
||
- name: Checkout esmpy_doc | ||
uses: actions/checkout@v3 | ||
with: | ||
repository: esmf-org/esmpy_doc | ||
path: esmpy_doc | ||
token: ${{ secrets.ESMF_WEB_TOKEN }} | ||
|
||
- name: Setup deployment | ||
run: | | ||
mkdir -p ~/.ssh | ||
if [ -z "${{secrets.ESMF_WEB_DEPLOY_KEY}}" ]; then | ||
echo "ERROR: Missing ESMF_WEB_DEPLOY_KEY!" | ||
exit 1 | ||
fi | ||
echo "${{secrets.ESMF_WEB_DEPLOY_KEY}}" > ~/.ssh/id_rsa | ||
chmod 600 ~/.ssh/id_rsa | ||
git config --global user.name "ESMF-Bot" | ||
git config --global user.email "[email protected]" | ||
git clone --depth=1 [email protected]:esmf-org/esmpy_doc.git ${{ github.workspace }}/esmpy_doc | ||
- name: Copy docs | ||
run: | | ||
|
@@ -60,10 +66,8 @@ jobs: | |
cp -rf latex/ESMPy.pdf ${{ github.workspace }}/esmpy_doc/docs/nightly/${{ github.ref_name }}/ | ||
- name: Commit and publish docs | ||
uses: actions-js/push@master | ||
with: | ||
repository: esmf-org/esmpy_doc | ||
directory: ${{ github.workspace }}/esmpy_doc | ||
branch: master | ||
github_token: ${{ secrets.ESMF_WEB_TOKEN }} | ||
message: 'Publish ESMPy Docs' | ||
run: | | ||
cd ${{ github.workspace }}/esmpy_doc | ||
git diff-index --quiet HEAD || git commit --message "Publish ESMPy Docs" | ||
git push origin | ||
rm ~/.ssh/id_rsa |