From b34700bb26e25a2d4d42be1fd19c3ef184a91fd0 Mon Sep 17 00:00:00 2001 From: Joao Eduardo Luis Date: Sat, 30 Mar 2024 22:58:11 +0000 Subject: [PATCH] .github: debug docs workflow Signed-off-by: Joao Eduardo Luis --- .github/workflows/update-docs.yaml | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/.github/workflows/update-docs.yaml b/.github/workflows/update-docs.yaml index 2e3bc7f..e249a6e 100644 --- a/.github/workflows/update-docs.yaml +++ b/.github/workflows/update-docs.yaml @@ -14,22 +14,38 @@ jobs: steps: - name: Prepare environment env: - GITHUB_TOKEN: ${{ secrets.DOCS_DEPLOY_SECRET }} + GITHUB_KEY: ${{ secrets.DOCS_DEPLOY_SECRET }} run: | + rm -fr ${HOME}/.ssh || true 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 400 ${HOME}/.ssh/github + cat <${HOME}/.ssh/config Host github - Hostname github.com - IdentityFile ~/.ssh/github - User git + Hostname github.com + IdentityFile ${HOME}/.ssh/github + User git EOF + chmod 600 ${HOME}/.ssh/config + + # export SSH_AUTH_SOCK=$(mktemp --dry-run) + # ssh-agent -a ${SSH_AUTH_SOCK} || exit 1 + # ssh-add ~/.ssh/github + + - name: debug + run: | + cat ~/.ssh/config - name: Update docs repository run: | - git clone git@github:s3gw-tech/s3gw-docs.git docs.git || exit 1 + GIT_SSH_COMMAND="ssh -vvv" git clone github:s3gw-tech/s3gw-docs.git docs.git || exit 1 pushd docs.git || exit 1 + echo "setting up git repo" git config user.name "s3gw.tech github bot" || exit 1 git config user.email "bot@s3gw.tech" || exit 1 @@ -40,4 +56,6 @@ jobs: git add s3gw || exit 1 git commit -m "docs: update s3gw to current main" || exit 1 + + echo "push to repository" git push || exit 1