Skip to content

Commit fde069f

Browse files
frant1cfrant1c
authored andcommitted
fix: change action
1 parent 65eda0c commit fde069f

File tree

4 files changed

+34
-49
lines changed

4 files changed

+34
-49
lines changed

.github/workflows.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

.github/workflows/deploy.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Deploy React to GitHub Pages
2+
3+
on:
4+
push:
5+
branches: [main]
6+
7+
jobs:
8+
build-and-deploy:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
14+
- name: Setup Node
15+
uses: actions/setup-node@v3
16+
with:
17+
node-version: "18"
18+
cache: "npm"
19+
20+
- name: Install and build
21+
run: |
22+
npm install
23+
npm run build
24+
touch build/.nojekyll
25+
26+
- name: Deploy
27+
uses: peaceiris/actions-gh-pages@v3
28+
with:
29+
github_token: ${{ secrets.GITHUB_TOKEN }}
30+
publish_dir: ./build

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@
88
"dev": "vite",
99
"build": "tsc -b && vite build",
1010
"lint": "eslint .",
11-
"preview": "vite preview"
11+
"preview": "vite preview",
12+
"predeploy": "npm run build && touch build/.nojekyll",
13+
"deploy": "gh-pages -d build"
1214
},
1315
"dependencies": {
1416
"@radix-ui/react-label": "^2.1.7",

public/.nojekyll

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+

0 commit comments

Comments
 (0)