-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (36 loc) · 1.03 KB
/
update-docs.yml
File metadata and controls
38 lines (36 loc) · 1.03 KB
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
# @format
name: Update Documentation
on:
pull_request:
branches: [main]
jobs:
run:
name: Generate Documentation README
runs-on: ubuntu-latest
env:
COMMIT_USER: GitHub Actions
COMMIT_EMAIL: actions@github.com
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Clean install npm dependencies
run: npm ci
- name: Run tests
run: npm test
- name: Update documentation
run: npm run docs
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
author_name: ${{ env.COMMIT_USER }}
author_email: ${{ env.COMMIT_EMAIL }}
message: '📝 Updating Docs [ci skip]'
# Configure for custom directories if required
# add: '.' # default '.'