Skip to content

Commit 47774fb

Browse files
authored
Update static.yml
1 parent 1cd9f7d commit 47774fb

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

.github/workflows/static.yml

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ on:
1111

1212
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
1313
permissions:
14-
contents: read
14+
contents: write
1515
pages: write
1616
id-token: write
1717

@@ -37,6 +37,15 @@ jobs:
3737
uses: oven-sh/setup-bun@v2
3838
- run: bun i
3939
- run: BASE_URL=/scratch-openapi bun scripts/build.ts
40+
- run: |
41+
git remote set-url origin https://github-actions:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}
42+
git config --global user.name "Actions"
43+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
44+
if (git diff --shortstat | grep '[0-9]'); then \
45+
git add .; \
46+
git commit -m "build schema"; \
47+
git push origin HEAD:${GITHUB_REF}; \
48+
fi
4049
- name: Upload artifact
4150
uses: actions/upload-pages-artifact@v3
4251
with:

0 commit comments

Comments
 (0)