ci: add auth for presets examples [skip ci]

This commit is contained in:
lowlighter
2022-01-26 19:54:11 -05:00
parent bb13f3f759
commit 61c89a318c
2 changed files with 3 additions and 1 deletions

View File

@@ -15,7 +15,7 @@ const __metrics = paths.join(paths.dirname(url.fileURLToPath(import.meta.url)),
const __presets = paths.join(__metrics, ".presets")
if ((!await fs.access(__presets).then(_ => true).catch(_ => false))||(!(await fs.lstat(__presets)).isDirectory()))
await sgit().clone("https://github.com/lowlighter/metrics.git", __presets, {"--branch":"presets", "--single-branch":true})
await sgit().clone(`https://github-actions[bot]:${process.env.GITHUB_TOKEN}@github.com/lowlighter/metrics`, __presets, {"--branch":"presets", "--single-branch":true})
const git = sgit(__presets)
await git.pull()
const staged = new Set()

View File

@@ -22,5 +22,7 @@ jobs:
run: npm ci
- name: Publish presets examples
run: npm run presets -- publish
env:
GITHUB_TOKEN: ${{ github.token }}