Skip to content

Commit 7ac48e2

Browse files
authored
Update CI and remove gh-pages branch (#453)
* Update CI * Fix lint * yarm -> yarn and add cache to lint action How did I put in yarm? * Pull before using yarn.lock in setup-node step
1 parent 6e5f892 commit 7ac48e2

4 files changed

Lines changed: 10726 additions & 35115 deletions

File tree

Lines changed: 44 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,65 @@
11
name: Build/Test/Deploy
22
on:
33
push:
4-
branches-ignore:
5-
- gh-pages
64
workflow_dispatch:
75
pull_request:
86

7+
permissions:
8+
contents: read
9+
pages: write
10+
id-token: write
11+
12+
concurrency:
13+
group: "pages"
14+
cancel-in-progress: false
15+
916
jobs:
1017
build:
11-
name: Build and Deploy
18+
name: Build
1219
runs-on: ubuntu-latest
1320
steps:
14-
- uses: actions/setup-node@v3
21+
- name: Checkout
22+
uses: actions/checkout@v4
1523
with:
16-
node-version: 16
17-
- name: Checkout Repository
18-
uses: actions/checkout@v3
19-
# with:
20-
# persist-credentials: false
21-
- name: Install
22-
run: npm ci
24+
submodules: 'recursive'
25+
- name: Setup Node
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: '22'
29+
cache: 'yarn'
30+
cache-dependency-path: ./yarn.lock
31+
- name: Install Dependencies
32+
run: yarn install --frozen-lockfile
2333
- name: Build
24-
run: npm run build
25-
- name: Deploy
26-
uses: JamesIves/github-pages-deploy-action@v4.4.0
27-
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master'}}
34+
run: yarn run build
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
2837
with:
29-
token: ${{ secrets.ACCESS_TOKEN }}
30-
folder: .vuepress/dist/
31-
clean: true
38+
path: .vuepress/dist/
39+
deploy:
40+
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
41+
environment:
42+
name: github-pages
43+
url: ${{ steps.deployment.outputs.page_url }}
44+
runs-on: ubuntu-latest
45+
needs: build
46+
steps:
47+
- name: Deploy to GitHub Pages
48+
id: deployment
49+
uses: actions/deploy-pages@v4
3250

3351
lint:
3452
name: Lint
3553
runs-on: ubuntu-latest
3654
steps:
37-
- uses: actions/setup-node@v3
38-
with:
39-
node-version: 16
4055
- name: Checkout Repository
41-
uses: actions/checkout@v3
56+
uses: actions/checkout@v4
57+
- uses: actions/setup-node@v4
58+
with:
59+
node-version: '22'
60+
cache: 'yarn'
61+
cache-dependency-path: ./yarn.lock
4262
- name: Install
43-
run: npm ci
63+
run: yarn install --frozen-lockfile
4464
- name: Lint
45-
run: npm run lint-ci
65+
run: yarn run lint-ci

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ node_modules/
44
.DS_Store
55
.vuepress/dist
66
.vuepress/.config.js.swp
7-
yarn.lock
7+
package-lock.json
88
yarn-error.log

0 commit comments

Comments
 (0)