From 3a8d2c8213731b4a1002309d719bc32ede45e979 Mon Sep 17 00:00:00 2001 From: marcustyphoon Date: Sun, 1 Dec 2024 17:25:17 -0800 Subject: [PATCH] Fix gh-pages workflow (7.9.2 branch) (#2169) --- .github/workflows/gh-pages.yml | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index 23e2c5536..059207080 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -7,6 +7,10 @@ on: paths: - 'Extensions/*' - 'Themes/*' + workflow_dispatch: + +permissions: + contents: write jobs: build: @@ -36,8 +40,13 @@ jobs: - name: Push changes to gh-pages run: > + git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git + npx gh-pages - --add - --dist . - --src "{Extensions/dist/*.json,Extensions/dist/page/gallery.json,Extensions/dist/page/list.json,Extensions/dist/page/themes.json}" - --message 'Rebuild Distribution' + -u "github-actions-bot " + --add + --dist . + --src "{Extensions/dist/*.json,Extensions/dist/page/gallery.json,Extensions/dist/page/list.json,Extensions/dist/page/themes.json}" + --message 'Rebuild Distribution' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}