Skip to content

Commit

Permalink
.github: debug docs workflow
Browse files Browse the repository at this point in the history
Signed-off-by: Joao Eduardo Luis <[email protected]>
  • Loading branch information
jecluis committed Mar 30, 2024
1 parent 1797f5a commit b34700b
Showing 1 changed file with 24 additions and 6 deletions.
30 changes: 24 additions & 6 deletions .github/workflows/update-docs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF>${HOME}/.ssh/github
${GITHUB_KEY}
EOF
chmod 400 ${HOME}/.ssh/github
cat <<EOF>${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 "[email protected]" || exit 1
Expand All @@ -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

0 comments on commit b34700b

Please sign in to comment.