Skip to content

Commit 54d290f

Browse files
committed
switch to new github pages approach
1 parent fee4665 commit 54d290f

File tree

1 file changed

+29
-6
lines changed

1 file changed

+29
-6
lines changed

.github/workflows/build.yml

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ on:
55
branches:
66
- main
77

8+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
9+
permissions:
10+
contents: read
11+
pages: write
12+
id-token: write
13+
14+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
819
jobs:
920
build:
1021
timeout-minutes: 2880
@@ -13,7 +24,7 @@ jobs:
1324

1425
steps:
1526
- name: Checkout code
16-
uses: actions/checkout@v3
27+
uses: actions/checkout@v4
1728

1829
- name: Build Packages
1930
run: ./build.sh
@@ -25,12 +36,13 @@ jobs:
2536
show-hidden: false
2637
overwrite: true
2738

28-
- name: Deploy to GitHub Pages
29-
uses: peaceiris/actions-gh-pages@v3
39+
- name: Setup Pages
40+
uses: actions/configure-pages@v4
41+
42+
- name: Upload artifact
43+
uses: actions/upload-pages-artifact@v3
3044
with:
31-
github_token: ${{ secrets.GITHUB_TOKEN }}
32-
publish_dir: ./repo
33-
force_orphan: true
45+
path: ./repo
3446

3547
- name: Cleanup
3648
if: always()
@@ -39,3 +51,14 @@ jobs:
3951
sudo chown -R $USER:$USER . || true
4052
echo "Pruning Docker..."
4153
docker system prune -af || true
54+
55+
deploy:
56+
environment:
57+
name: github-pages
58+
url: ${{ steps.deployment.outputs.page_url }}
59+
runs-on: ubuntu-latest
60+
needs: build
61+
steps:
62+
- name: Deploy to GitHub Pages
63+
id: deployment
64+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)