Skip to content

Commit

Permalink
Use PAT token to allow pushing to repo
Browse files Browse the repository at this point in the history
  • Loading branch information
sophialittlejohn committed Jan 14, 2025
1 parent 60a8a25 commit fef7676
Show file tree
Hide file tree
Showing 55 changed files with 7 additions and 3,629 deletions.
9 changes: 6 additions & 3 deletions .github/ci-scripts/update-sdk-docs.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ async function main() {
try {
// Clone the SDK docs repo
const git = simpleGit()
const repoUrl = `https://x-access-token:${process.env.GITHUB_TOKEN}@github.com/centrifuge/sdk-docs.git`
const repoUrl = 'https://github.com/centrifuge/sdk-docs.git'
await git.clone(repoUrl, './sdk-docs')

// Set Git identity for this repo
Expand Down Expand Up @@ -76,12 +76,15 @@ async function main() {
--body "${prBody}" \
--base main \
--head ${branchName} \
--repo "org/sdk-docs"`
--repo "centrifuge/sdk-docs"`

const { execSync } = require('child_process')
execSync(prCommand, {
stdio: 'inherit',
env: { ...process.env },
env: {
...process.env,
GH_TOKEN: process.env.PAT_TOKEN,
},
})

console.log('Successfully created PR with documentation updates')
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,5 +59,5 @@ jobs:
- name: Update docs
if: steps.commit_check.outputs.has_changes == 'true'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
run: node ./.github/ci-scripts/update-sdk-docs.cjs
192 changes: 0 additions & 192 deletions docs/_README.md

This file was deleted.

68 changes: 0 additions & 68 deletions docs/_globals.md

This file was deleted.

Loading

0 comments on commit fef7676

Please sign in to comment.