Skip to content

Commit e340574

Browse files
committed
ci: switch to official GitHub Pages workflow (build + upload-pages-artifact + deploy-pages); remove legacy gh-pages deploy to avoid conflicts; no user action required
1 parent 21468a8 commit e340574

1 file changed

Lines changed: 26 additions & 7 deletions

File tree

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,21 @@
1-
name: Deploy fancy website
1+
name: GitHub Pages
22

33
on:
44
push:
55
branches: [ main ]
66
workflow_dispatch:
77

8+
permissions:
9+
contents: read
10+
pages: write
11+
id-token: write
12+
13+
concurrency:
14+
group: "pages"
15+
cancel-in-progress: true
16+
817
jobs:
9-
build-deploy:
18+
build:
1019
runs-on: ubuntu-latest
1120
steps:
1221
- name: Checkout
@@ -29,9 +38,19 @@ jobs:
2938
npm install --no-save marked
3039
node scripts/generate_site.mjs
3140
32-
- name: Deploy to GitHub Pages
33-
uses: peaceiris/actions-gh-pages@v3
41+
- name: Upload artifact
42+
uses: actions/upload-pages-artifact@v3
3443
with:
35-
github_token: ${{ secrets.GITHUB_TOKEN }}
36-
publish_dir: ./docs
37-
cname: ideas.onlyideas.art
44+
path: ./docs
45+
46+
deploy:
47+
environment:
48+
name: github-pages
49+
url: ${{ steps.deployment.outputs.page_url }}
50+
runs-on: ubuntu-latest
51+
needs: build
52+
steps:
53+
- name: Deploy to GitHub Pages
54+
id: deployment
55+
uses: actions/deploy-pages@v4
56+

0 commit comments

Comments
 (0)