Skip to content

Commit 645c163

Browse files
authored
Update main.yml
1 parent 6c8caac commit 645c163

1 file changed

Lines changed: 17 additions & 10 deletions

File tree

.github/workflows/main.yml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,29 @@
11
name: Build and Deploy
2-
on: [push]
2+
on:
3+
push:
4+
branches:
5+
- main
6+
37
jobs:
48
build-and-deploy:
59
runs-on: ubuntu-latest
610
steps:
711
- name: Checkout
8-
uses: actions/checkout@main
12+
uses: actions/checkout@v4
913

1014
- name: Setup Node.js
1115
uses: actions/setup-node@v4
1216
with:
13-
node-version: "16"
17+
node-version: "18"
1418
cache: "yarn"
1519

16-
- name: Vuepress deploy
17-
uses: jenkey2011/vuepress-deploy@1.0.1
18-
env:
19-
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
20-
BUILD_SCRIPT: yarn && yarn build
21-
TARGET_BRANCH: gh-pages
22-
BUILD_DIR: build/
20+
- name: Install and Build
21+
run: |
22+
yarn install
23+
yarn build
24+
25+
- name: Deploy
26+
uses: peaceiris/actions-gh-pages@v3
27+
with:
28+
github_token: ${{ secrets.ACCESS_TOKEN }}
29+
publish_dir: ./build

0 commit comments

Comments
 (0)