Skip to content

Commit cbb421b

Browse files
committed
ci: Skip gh-pages branch, deploy site directly
1 parent 834cacd commit cbb421b

File tree

2 files changed

+21
-12
lines changed

2 files changed

+21
-12
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Build spec
22

3-
on: [pull_request, push]
3+
on: [pull_request]
44

55
jobs:
66
build:

.github/workflows/deploy.yml

Lines changed: 20 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,32 @@
1-
name: Deploy gh-pages
1+
name: Deploy spec to GitHub Pages
22

33
permissions:
4-
contents: write
4+
contents: read
5+
pages: write
6+
id-token: write
57

68
on:
79
push:
810
branches:
911
- main
1012

13+
concurrency:
14+
group: pages
15+
cancel-in-progress: false
16+
1117
jobs:
1218
deploy:
19+
environment:
20+
name: github-pages
21+
url: ${{ steps.deployment.outputs.page_url }}
1322
runs-on: ubuntu-latest
14-
1523
steps:
16-
- uses: actions/checkout@v4
17-
- run: npm install
18-
- run: npm run build
19-
- uses: JamesIves/github-pages-deploy-action@v4
20-
with:
21-
branch: gh-pages
22-
folder: build
23-
clean: true
24+
- uses: actions/checkout@v4
25+
- uses: actions/configure-pages@v5
26+
- run: npm install
27+
- run: npm run build
28+
- uses: actions/upload-pages-artifact@v3
29+
with:
30+
path: build/
31+
- uses: actions/deploy-pages@v4
32+
id: deployment

0 commit comments

Comments
 (0)