Skip to content

Commit d371bbb

Browse files
authored
chore(ci): Update deploy.yml (#20)
* chore(ci): Move deployment procedures to ci * chore(ci): Bump node version to 22 * chore(ci): Update build_dir
1 parent b6ae542 commit d371bbb

2 files changed

Lines changed: 10 additions & 7 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,29 +9,32 @@ jobs:
99
runs-on: ubuntu-latest
1010
steps:
1111
- name: Checkout
12-
uses: actions/checkout@v2
12+
uses: actions/checkout@v6
1313
with:
1414
persist-credentials: false
1515

1616
- name: Setup Node
17-
uses: actions/setup-node@v2
17+
uses: actions/setup-node@v6
1818
with:
19-
node-version: '16'
19+
node-version: '22'
2020

2121
- name: Install dependencies
2222
run: yarn install
2323

24-
- name: Build NextJS
24+
- name: Build project and prepare for deployment
2525
env:
2626
NODE_ENV: production
27-
run: yarn build
27+
run: |
28+
yarn build
29+
touch dist/.nojekyll
30+
cp CNAME ./dist
2831
2932
- name: Deploy to GitHub Pages
3033
uses: crazy-max/ghaction-github-pages@v2
3134
if: success()
3235
with:
3336
target_branch: gh-pages
34-
build_dir: out
37+
build_dir: dist
3538
commit_message: 'chore: deploy to GitHub Pages'
3639
env:
3740
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"scripts": {
66
"dev": "vite",
7-
"build": "vite build && touch dist/.nojekyll && cp CNAME ./dist",
7+
"build": "vite build",
88
"preview": "vite preview",
99
"lint": "eslint --ext .js,.jsx,.ts,.tsx src"
1010
},

0 commit comments

Comments
 (0)