diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml index ef2ae2ef5..23e2c5536 100644 --- a/.github/workflows/gh-pages.yml +++ b/.github/workflows/gh-pages.yml @@ -14,26 +14,13 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 + uses: actions/checkout@v4 - name: Setup Node.js environment - uses: actions/setup-node@v2.1.2 + uses: actions/setup-node@v4 with: node-version: 14 - - - name: Configure git - run: | - git config --global user.name "github-actions" - git config --global user.email "github-actions[bot]@users.noreply.github.com" - - - name: Fetch and reset gh-pages - run: | - git remote set-branches --add origin gh-pages - git fetch - git checkout -f -t -b gh-pages origin/gh-pages - git reset --hard 7.9.2 + cache: npm - name: Install dependencies run: npm ci @@ -47,10 +34,10 @@ jobs: - name: Build distribution run: gulp build - - name: Commit changes - run: | - git add --force Extensions/ - git commit -m 'Rebuild Distribution' - - - name: Force-push to gh-pages - run: git push -f + - name: Push changes to gh-pages + run: > + 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'