-
-
Notifications
You must be signed in to change notification settings - Fork 611
57 lines (43 loc) · 1.32 KB
/
update-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: webpack-cli docs
on:
pull_request:
types: [labeled]
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
update-docs:
name: Update docs
if: contains(github.event.pull_request.labels.*.name, 'update docs')
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [lts/*]
steps:
- name: Checkout Codebase
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.ref }}
token: ${{ env.GITHUB_ACCESS_TOKEN }}
- name: Using Node v${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: "yarn"
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Install latest webpack and webpack-dev-server version
run: yarn add -W webpack-dev-server@latest webpack@latest
- name: Build
run: yarn build
- name: Update docs
run: yarn update:docs
- name: Fix formatting
run: yarn lint:prettier --write
- name: Commit updated docs
uses: EndBug/[email protected]
with:
add: "*.md"
message: "docs: update options"
author_name: Nitin Kumar
author_email: [email protected]