Merge branch 'work/reconcile-scaling' into develop #1264
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
name: Build ESMPy Docs | |
on: | |
workflow_dispatch: | |
push: | |
concurrency: | |
group: build-esmpy-docs-${{ github.ref_name }} | |
cancel-in-progress: true | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout Dockerfiles | |
uses: actions/checkout@v3 | |
with: | |
repository: esmf-org/esmf-containers | |
path: esmf-containers | |
ref: main | |
- name: Build Docker image | |
run: | | |
cd ${{ github.workspace }}/esmf-containers/build-esmf-docs/esmpy | |
docker build . --tag esmf/build-esmpy-docs --build-arg ESMF_BRANCH="${{ github.ref_name }}" --no-cache | |
- name: Copy artifacts | |
run: | | |
mkdir -p ${{ github.workspace }}/artifacts | |
CID=$(docker run -dit --name runner esmf/build-esmpy-docs) | |
docker cp ${CID}:/artifacts/doc-esmpy.zip ${{ github.workspace }}/artifacts | |
docker stop ${CID} | |
docker rm ${CID} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: esmpy-docs | |
path: ${{ github.workspace }}/artifacts | |
- name: Checkout esmpy_doc | |
uses: actions/checkout@v3 | |
with: | |
repository: esmf-org/esmpy_doc | |
path: ${{github.workspace}}/esmpy_doc | |
ssh-key: ${{secrets.ESMPY_WEB_DEPLOY_KEY}} | |
- name: Copy docs | |
run: | | |
cd ${{ github.workspace }}/esmpy_doc | |
mkdir -p docs/nightly/${{ github.ref_name }} | |
cd ${{ github.workspace }}/artifacts | |
unzip doc-esmpy.zip | |
cd ${{ github.workspace }}/artifacts/doc-esmpy/esmpy_doc | |
cp -rf html ${{ github.workspace }}/esmpy_doc/docs/nightly/${{ github.ref_name }}/ | |
cp -rf latex/ESMPy.pdf ${{ github.workspace }}/esmpy_doc/docs/nightly/${{ github.ref_name }}/ | |
- name: Commit and publish docs | |
run: | | |
cd ${{ github.workspace }}/esmpy_doc | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git add . | |
git diff-index --quiet HEAD || git commit --message "Publish ESMPy Docs" | |
git push origin |