From d2b6dca478f1cbbf5eae8aaca5440f82b10a33ac Mon Sep 17 00:00:00 2001
From: Pierre Leroux
Date: Mon, 2 Dec 2024 18:09:25 +0100
Subject: [PATCH] fix: gh-pages deployment switch from manually push to
artifacts/deploy actions to a `gh-pages` branch
---
.github/workflows/gh-pages.yml | 21 +++++++++++----------
1 file changed, 11 insertions(+), 10 deletions(-)
diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml
index ebac6bc..4cd28ee 100644
--- a/.github/workflows/gh-pages.yml
+++ b/.github/workflows/gh-pages.yml
@@ -49,14 +49,15 @@ jobs:
ls -laR ./build-demo
- - name: Setup Pages
- uses: actions/configure-pages@v5
-
- - name: Upload artifact
- uses: actions/upload-pages-artifact@v3
+ - name: Deploy
+ uses: peaceiris/actions-gh-pages@v4
+ # If you're changing the branch from main,
+ # also change the `main` in `refs/heads/main`
+ # below accordingly.
+ if: github.ref == 'refs/heads/main'
with:
- path: "./build-demo"
-
- - name: Deploy to GitHub Pages
- id: deployment
- uses: actions/deploy-pages@v4
+ github_token: ${{ secrets.GITHUB_TOKEN }}
+ publish_dir: ./build-demo
+ publish_branch: gh-pages # default: gh-pages
+ destination_dir: ./
+ enable_jekyll: true # yes for README.md
\ No newline at end of file