Skip to content

Commit ab9766a

Browse files
committed
fix(ci): use GitHub App token for docs sync
1 parent 97de7cd commit ab9766a

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

.github/workflows/cli-docs.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,19 @@ jobs:
6262
echo "No docs changes to commit"
6363
fi
6464
65+
- name: Generate docs repo token
66+
id: app-token
67+
uses: actions/create-github-app-token@v1
68+
with:
69+
app-id: ${{ vars.DOCS_SYNC_APP_ID }}
70+
private-key: ${{ secrets.DOCS_SYNC_APP_KEY }}
71+
repositories: genlayer-docs
72+
6573
- name: Checkout docs repo
6674
uses: actions/checkout@v4
6775
with:
6876
repository: genlayerlabs/genlayer-docs
69-
token: ${{ secrets.DOCS_REPO_TOKEN || secrets.GITHUB_TOKEN }}
77+
token: ${{ steps.app-token.outputs.token }}
7078
path: docs-repo
7179
fetch-depth: 0
7280

@@ -105,7 +113,7 @@ jobs:
105113
if: env.HAS_CHANGES == 'true'
106114
uses: peter-evans/create-pull-request@v6
107115
with:
108-
token: ${{ secrets.DOCS_REPO_TOKEN || secrets.GITHUB_TOKEN }}
116+
token: ${{ steps.app-token.outputs.token }}
109117
path: docs-repo
110118
commit-message: "docs(cli): sync API reference ${{ steps.version.outputs.value }}"
111119
branch: ${{ env.BRANCH }}

0 commit comments

Comments
 (0)