Skip to content

Commit

Permalink
Prevent 7.9.2 gh-pages deploy from overwriting version (#2160)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcustyphoon authored Nov 22, 2024
1 parent 4c909e9 commit 550c954
Showing 1 changed file with 10 additions and 23 deletions.
33 changes: 10 additions & 23 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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'

0 comments on commit 550c954

Please sign in to comment.