Skip to content

Commit 4d0a0a2

Browse files
Update build action to use newer actions pages workflow
1 parent eda14b9 commit 4d0a0a2

File tree

1 file changed

+30
-8
lines changed

1 file changed

+30
-8
lines changed

.github/workflows/main.yaml

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,32 @@
11
name: Build and Deploy
22

33
on:
4-
5-
workflow_dispatch:
4+
push:
5+
branches:
6+
- 'main'
7+
pull_request:
8+
branches:
9+
- 'main'
10+
workflow_dispatch:
611

712
permissions:
8-
contents: write
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: false
922

1023
jobs:
1124
build-and-deploy:
12-
concurrency: ci-${{ github.ref }}
25+
environment:
26+
name: github-pages
27+
url: ${{ steps.deployment.outputs.page_url }}
1328
runs-on: ubuntu-latest
29+
concurrency: ci-${{ github.ref }}
1430
steps:
1531
- name: Clone repository
1632
uses: actions/checkout@v2
@@ -21,8 +37,14 @@ jobs:
2137
- name: Build Site
2238
run: npm run build
2339

24-
- name: Deploy
25-
uses: JamesIves/github-pages-deploy-action@v4
40+
- name: Setup Pages
41+
uses: actions/configure-pages@v5
42+
43+
- name: Upload artifact
44+
uses: actions/upload-pages-artifact@v3
2645
with:
27-
folder: _site
28-
clean: true
46+
path: '_site'
47+
48+
- name: Deploy to GitHub Pages
49+
id: deployment
50+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)