Skip to content

Commit

Permalink
Define SSH_AUTH_SOCK
Browse files Browse the repository at this point in the history
  • Loading branch information
danrosen25 committed Aug 24, 2023
1 parent c455ede commit bfd3797
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 4 deletions.
8 changes: 6 additions & 2 deletions .github/workflows/build-esmf-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@ jobs:
path: ${{ github.workspace }}/artifacts

- name: Setup deployment
env:
SSH_AUTH_SOCK: ${{runner.temp}}/ssh_agent.sock
run: |
mkdir -p ~/.ssh
if [ -z "${{secrets.ESMF_WEB_DEPLOY_KEY}}" ]; then
echo "ERROR: Missing ESMF_WEB_DEPLOY_KEY!"
exit 1
fi
eval `ssh-agent -s`
ssh-add - <<< '${{secrets.ESMF_WEB_DEPLOY_KEY}}'
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{secrets.ESMF_WEB_DEPLOY_KEY}}"
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git clone --depth=1 [email protected]:esmf-org/esmf-org.github.io.git ${{ github.workspace }}/esmf-org.github.io
Expand All @@ -72,6 +74,8 @@ jobs:
cp -rf ./dev_guide/dev_guide/* ${{ github.workspace }}/esmf-org.github.io/docs/nightly/${{ github.ref_name }}/dev_guide/
- name: Commit and publish docs
env:
SSH_AUTH_SOCK: ${{runner.temp}}/ssh_agent.sock
run: |
cd ${{ github.workspace }}/esmf-org.github.io
git add .
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/build-esmpy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,16 @@ jobs:
path: ${{ github.workspace }}/artifacts

- name: Setup deployment
env:
SSH_AUTH_SOCK: ${{runner.temp}}/ssh_agent.sock
run: |
mkdir -p ~/.ssh
if [ -z "${{secrets.ESMPY_WEB_DEPLOY_KEY}}" ]; then
echo "ERROR: Missing ESMPY_WEB_DEPLOY_KEY!"
exit 1
fi
eval `ssh-agent -s`
ssh-add - <<< '${{secrets.ESMPY_WEB_DEPLOY_KEY}}'
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{secrets.ESMPY_WEB_DEPLOY_KEY}}"
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git clone --depth=1 [email protected]:esmf-org/esmpy_doc.git ${{ github.workspace }}/esmpy_doc
Expand All @@ -66,6 +68,8 @@ jobs:
cp -rf latex/ESMPy.pdf ${{ github.workspace }}/esmpy_doc/docs/nightly/${{ github.ref_name }}/
- name: Commit and publish docs
env:
SSH_AUTH_SOCK: ${{runner.temp}}/ssh_agent.sock
run: |
cd ${{ github.workspace }}/esmpy_doc
git add .
Expand Down

0 comments on commit bfd3797

Please sign in to comment.