Skip to content

Commit ea485df

Browse files
committed
Add workflow to update devtools-protocol’s gh-pages branch
Issue: #278
1 parent 45c6a69 commit ea485df

File tree

3 files changed

+40
-6
lines changed

3 files changed

+40
-6
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: 😎
22
on:
33
pull_request:
44
push:
5-
branches:
5+
branches:
66
- master
77
jobs:
88
lighthouse_ci:
@@ -13,18 +13,18 @@ jobs:
1313

1414
- name: git clone
1515
uses: actions/checkout@v1
16-
17-
- name: setup node.js
18-
uses: actions/setup-node@v1
16+
17+
- name: Set up Node.js
18+
uses: actions/setup-node@v3
1919
with:
20-
node-version: 14.x
20+
node-version-file: '.nvmrc'
2121

2222
- name: build
2323
run: npm i && npm run build
2424

2525
- name: install lhci
2626
run: npm install @lhci/cli@latest
27-
27+
2828
- name: run lhci
2929
run: |
3030
npx lhci autorun \

.github/workflows/update.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: update-devtools-protocol-gh-pages
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
schedule:
8+
# Run daily at 05:20 UTC.
9+
- cron: '20 5 * * *'
10+
workflow_dispatch:
11+
12+
jobs:
13+
update-devtools-protocol-gh-pages:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Check out
17+
uses: actions/checkout@v2
18+
with:
19+
ref: ${{ github.head_ref }}
20+
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
21+
# Fetching full history is required for the changelog script.
22+
fetch-depth: 0
23+
24+
- name: Set up Node.js
25+
uses: actions/setup-node@v3
26+
with:
27+
node-version-file: '.nvmrc'
28+
29+
- name: Update devtools-protocol gh-pages
30+
run: |
31+
npm install
32+
npm run build
33+
npm run deploy

.nvmrc

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

0 commit comments

Comments
 (0)