diff --git a/.github/workflows/update-docs.yaml b/.github/workflows/update-docs.yaml index 2e3bc7f..375e199 100644 --- a/.github/workflows/update-docs.yaml +++ b/.github/workflows/update-docs.yaml @@ -14,16 +14,32 @@ jobs: steps: - name: Prepare environment env: - GITHUB_TOKEN: ${{ secrets.DOCS_DEPLOY_SECRET }} + GITHUB_KEY: ${{ secrets.DOCS_DEPLOY_SECRET }} run: | mkdir -p ${HOME}/.ssh || true - echo -e "${GITHUB_KEY}\n" > ${HOME}/.ssh/github + chmod 700 ${HOME}/.ssh || exit 1 + cat <${HOME}/.ssh/github + ${GITHUB_KEY} + EOF + chmod 600 ${HOME}/.ssh/github + cat <${HOME}/.ssh/config Host github - Hostname github.com - IdentityFile ~/.ssh/github - User git + Hostname github.com + IdentityFile ~/.ssh/github + User git EOF + chmod 600 ${HOME}/.ssh/config + + env + + ssh-agent -a /tmp/ssh-auth.sock || exit 1 + export SSH_AUTH_SOCK=/tmp/ssh-auth.sock + ssh-add ~/.ssh/github + + - name: debug + run: | + cat ~/.ssh/config - name: Update docs repository run: |