Skip to content

Commit ece629d

Browse files
committed
ci(demo-deploy): migrate to GitHub Pages standard deployment workflow
Split the deploy job into build and deploy jobs, replacing peaceiris/actions-gh-pages with the official actions/upload-pages-artifact and actions/deploy-pages actions. Add github-pages environment for deployment status tracking.
1 parent 717a805 commit ece629d

1 file changed

Lines changed: 15 additions & 6 deletions

File tree

.github/workflows/demo-deploy.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions:
99
contents: write
1010

1111
jobs:
12-
deploy:
12+
build:
1313
runs-on: ubuntu-latest
1414
steps:
1515
- name: Checkout
@@ -46,9 +46,18 @@ jobs:
4646
- name: Build demo
4747
run: npm run demo:build
4848

49-
- name: Deploy to GitHub Pages
50-
uses: peaceiris/actions-gh-pages@v4
49+
- name: Upload Pages artifact
50+
uses: actions/upload-pages-artifact@v3
5151
with:
52-
github_token: ${{ secrets.GITHUB_TOKEN }}
53-
publish_dir: ./demo/dist
54-
force_orphan: true
52+
path: demo/dist
53+
54+
deploy:
55+
needs: build
56+
runs-on: ubuntu-latest
57+
environment:
58+
name: github-pages
59+
url: ${{ steps.deployment.outputs.page_url }}
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)