From 1ed773774330692fcec0fcade74dacb1aaceb9c3 Mon Sep 17 00:00:00 2001 From: Alex Feyerke Date: Wed, 29 Apr 2026 14:21:07 +0200 Subject: [PATCH 1/2] CI: attempt deployment without unauthorized ssh-agent action --- .github/workflows/docs.yml | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7395183479..dab49c8607 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -22,7 +22,7 @@ jobs: test-docs: runs-on: ubuntu-22.04 steps: - - name: Checkout + - name: Checkout PouchDB repo uses: actions/checkout@v4 with: persist-credentials: false @@ -30,10 +30,6 @@ jobs: with: node-version: 24 - run: BUILD=1 npm run build-site - - name: Setup SSH agent - uses: webfactory/ssh-agent@v0.9.0 - with: - ssh-private-key: ${{ secrets.POUCHDB_WEBSITE_BUILD }} - name: Checkout pouchdb-site repo uses: actions/checkout@v4 with: @@ -43,10 +39,13 @@ jobs: path: checked-out-pouchdb-site fetch-depth: 0 - name: Commit and push if changed + env: + POUCHDB_WEBSITE_BUILD: ${{ secrets.POUCHDB_WEBSITE_BUILD }} run: | cd checked-out-pouchdb-site - git config user.name "CI" - git config user.email "ci@users.noreply.github.com" + 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 checkout asf-site From 2ad3e5344100df832b2a7003c4ad00517d046d78 Mon Sep 17 00:00:00 2001 From: Alex Feyerke Date: Wed, 29 Apr 2026 14:56:38 +0200 Subject: [PATCH 2/2] CI: only trigger website deployment on push to master --- .github/workflows/docs.yml | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index dab49c8607..b1caf66e47 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,13 +2,6 @@ name: PouchDB Docs on: push: - paths: - - '.github/actions/**' - - '.github/workflows/docs.yml' - - 'package.json' - - 'bin/**' - - 'docs/**' - pull_request: branches: [master] paths: - '.github/actions/**' @@ -54,11 +47,13 @@ jobs: cp -R ../docs/_site/. . + git remote -v + if [[ -n $(git status --porcelain) ]]; then echo "Committing changes…" git add -A git commit -m "Deploy site from ${GITHUB_REPOSITORY}@${GITHUB_SHA}" - git push git@github.com:apache/pouchdb-site.git asf-site --force + git push origin asf-site --force else echo "No changes to commit" fi \ No newline at end of file