diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a28d9da8db..f1089f35ee 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -30,35 +30,20 @@ jobs: ref: asf-site path: checked-out-pouchdb-site fetch-depth: 0 - - name: Set up SSH - run: | - mkdir -p ~/.ssh - echo "${{ secrets.POUCHDB_WEBSITE_BUILD }}" > ~/.ssh/id_rsa - chmod 600 ~/.ssh/id_rsa - ssh-keyscan github.com >> ~/.ssh/known_hosts - - name: Configure SSH for GitHub - run: | - echo "Host github.com - IdentityFile ~/.ssh/id_rsa - IdentitiesOnly yes" >> ~/.ssh/config - name: Commit and push if changed env: POUCHDB_WEBSITE_BUILD: ${{ secrets.POUCHDB_WEBSITE_BUILD }} run: | cd checked-out-pouchdb-site - git remote set-url origin git@github.com:apache/pouchdb-site.git + git remote add deploy https://asf-ci-deploy:$POUCHDB_WEBSITE_BUILD@github.com/apache/pouchdb-site echo "Git remotes:" git remote -v - # git config url."https://asf-ci-deploy:$POUCHDB_WEBSITE_BUILD@github.com/".insteadOf "https://github.com/" git config user.email ${{ github.actor }}@users.noreply.github.com git config user.name ${{ github.actor }} - # Juuust in case - GIT_TRACE=1 GIT_CURL_VERBOSE=1 git checkout asf-site - git rm -rf . || true cp -R ../docs/_site/. . @@ -67,7 +52,7 @@ jobs: echo "Committing changes…" git add -A git commit -m "Deploy site from ${GITHUB_REPOSITORY}@${GITHUB_SHA}" - GIT_TRACE=1 GIT_CURL_VERBOSE=1 git push origin asf-site --force + GIT_TRACE=1 GIT_CURL_VERBOSE=1 git push deploy asf-site --force else echo "No changes to commit" fi \ No newline at end of file