Skip to content

Commit a9106c1

Browse files
committed
added github workflow
1 parent 3159c23 commit a9106c1

File tree

2 files changed

+34
-2
lines changed

2 files changed

+34
-2
lines changed

.github/workflows/deploy.yml

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

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
{
22
"name": "thunder_site",
3-
"homepage": "http://thunder-app.github.io",
3+
"homepage": "https://thunder-app.github.io",
44
"private": true,
55
"version": "0.0.0",
66
"type": "module",
77
"scripts": {
88
"dev": "vite",
99
"build": "tsc && vite build",
1010
"predeploy" : "npm run build",
11-
"deploy" : "gh-pages -d build",
11+
"deploy" : "gh-pages -d dist --cname thunderapp.dev",
1212
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0",
1313
"preview": "vite preview"
1414
},

0 commit comments

Comments
 (0)