Skip to content

Commit e75d842

Browse files
committed
Simplify GitHub Actions workflow
1 parent 56a26e8 commit e75d842

File tree

1 file changed

+15
-38
lines changed

1 file changed

+15
-38
lines changed

.github/workflows/deploy.yml

+15-38
Original file line numberDiff line numberDiff line change
@@ -1,52 +1,29 @@
1-
name: Deploy Next.js site to Pages
1+
name: Deploy to GitHub Pages
22

33
on:
44
push:
5-
branches: ["main"]
6-
workflow_dispatch:
7-
8-
permissions:
9-
contents: read
10-
pages: write
11-
id-token: write
12-
13-
concurrency:
14-
group: "pages"
15-
cancel-in-progress: true
5+
branches: [ main ]
166

177
jobs:
18-
build:
8+
build-and-deploy:
199
runs-on: ubuntu-latest
10+
2011
steps:
21-
- name: Checkout
22-
uses: actions/checkout@v4
23-
24-
- name: Setup Node
12+
- uses: actions/checkout@v4
13+
14+
- name: Setup Node.js
2515
uses: actions/setup-node@v4
2616
with:
27-
node-version: "18"
28-
29-
- name: Setup Pages
30-
uses: actions/configure-pages@v4
31-
17+
node-version: '18'
18+
3219
- name: Install dependencies
3320
run: npm install
34-
35-
- name: Build with Next.js
21+
22+
- name: Build
3623
run: npm run build
37-
38-
- name: Upload artifact
39-
uses: actions/upload-pages-artifact@v1
40-
with:
41-
path: ./out
4224

43-
deploy:
44-
environment:
45-
name: github-pages
46-
url: ${{ steps.deployment.outputs.page_url }}
47-
runs-on: ubuntu-latest
48-
needs: build
49-
steps:
5025
- name: Deploy to GitHub Pages
51-
id: deployment
52-
uses: actions/deploy-pages@v1
26+
uses: peaceiris/actions-gh-pages@v3
27+
with:
28+
github_token: ${{ secrets.GITHUB_TOKEN }}
29+
publish_dir: ./out

0 commit comments

Comments
 (0)