Skip to content

Commit a8924a7

Browse files
committed
Add GitHub Pages deployment workflow
0 parents  commit a8924a7

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

.github/workflows/deploy.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Deploy to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build-and-deploy:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '18'
21+
22+
- name: Setup pnpm
23+
uses: pnpm/action-setup@v2
24+
with:
25+
version: latest
26+
27+
- name: Install dependencies
28+
run: pnpm install
29+
30+
- name: Build
31+
run: pnpm run build
32+
33+
- name: Deploy to GitHub Pages
34+
uses: peaceiris/actions-gh-pages@v3
35+
if: github.ref == 'refs/heads/main'
36+
with:
37+
github_token: ${{ secrets.GITHUB_TOKEN }}
38+
publish_dir: ./dist

package.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"name": "task-board",
3+
"version": "1.0.0",
4+
"scripts": {
5+
"dev": "run-p watch serve",
6+
"watch": "tsc -w",
7+
"serve": "live-server --open=src/index.html",
8+
"build": "tsc"
9+
},
10+
"devDependencies": {
11+
"npm-run-all": "^4.1.5",
12+
"typescript": "^5.0.0",
13+
"live-server": "^1.2.1"
14+
}
15+
}

0 commit comments

Comments
 (0)