Skip to content

Commit 1cd88d9

Browse files
authored
Update node.js.yml
1 parent 475360f commit 1cd88d9

File tree

1 file changed

+13
-49
lines changed

1 file changed

+13
-49
lines changed

.github/workflows/node.js.yml

Lines changed: 13 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,18 @@
1-
name: Node.js CI
2-
1+
name: GitHub Actions blog
32
on:
43
push:
5-
branches: [ "master" ]
6-
pull_request:
7-
branches: [ "master" ]
8-
4+
branches:
5+
- master
96
jobs:
10-
build:
11-
runs-on: ubuntu-latest
12-
13-
strategy:
14-
matrix:
15-
node-version: [14.x, 16.x, 18.x]
16-
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
17-
18-
steps:
19-
- uses: actions/checkout@v2
20-
21-
- name: Use Node.js ${{ matrix.node-version }}
22-
uses: actions/setup-node@v3
23-
with:
24-
node-version: ${{ matrix.node-version }}
25-
cache: 'npm'
26-
27-
- run: npm ci
28-
- run: npm run build --if-present
29-
- run: npm test
30-
31-
deploy:
7+
build-and-deploy:
328
runs-on: ubuntu-latest
33-
needs: build
34-
359
steps:
36-
- uses: actions/checkout@v2
37-
38-
- name: Setup Node.js
39-
uses: actions/setup-node@v3
40-
with:
41-
node-version: '18.x'
42-
43-
- name: Install dependencies
44-
run: npm install
45-
46-
- name: Build docs
47-
run: npm run build
48-
49-
- name: Deploy to GitHub Pages
50-
uses: JamesIves/github-pages-deploy-action@v4
51-
with:
52-
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
53-
BRANCH: gh-pages
54-
FOLDER: .vuepress/dist
10+
- name: Checkout
11+
uses: actions/checkout@master
12+
13+
- name: Deploy to GitHub Pages
14+
uses: JamesIves/github-pages-deploy-action@v4
15+
with:
16+
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
17+
BRANCH: gh-pages
18+
FOLDER: .vuepress/dist

0 commit comments

Comments
 (0)