Skip to content

Commit d210be9

Browse files
committed
adding github cli actions for github pages
1 parent 124af16 commit d210be9

File tree

2 files changed

+32
-1
lines changed

2 files changed

+32
-1
lines changed

.github/workflows/build-ages.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- gh-pages
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v2
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: '14'
19+
20+
- name: Install dependencies
21+
run: npm install
22+
23+
- name: Build the project
24+
run: npm run build
25+
26+
- name: Deploy to GitHub Pages
27+
uses: peaceiris/actions-gh-pages@v3
28+
with:
29+
github_token: ${{ secrets.GITHUB_TOKEN }}
30+
publish_dir: ./out
31+
publish_branch: gh-pages

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"scripts": {
44
"dev": "next dev --turbo",
55
"build": "next build",
6-
"deploy": "next build && touch out/.nojekyll && git add out/ && git commit -m \"Deploy\" && git subtree push --prefix out origin gh-pages"
6+
"deploy": "next build && touch out/.nojekyll"
77
},
88
"dependencies": {
99
"next": "15.0.1",

0 commit comments

Comments
 (0)