-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (41 loc) · 1.31 KB
/
generate_docs.yml
File metadata and controls
50 lines (41 loc) · 1.31 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
39
40
41
42
43
44
45
46
47
48
49
50
name: Generate Docs
on:
push:
branches:
- main
jobs:
generate-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
- name: Install dependencies
run: npm install
- name: Generate TypeDoc
run: npm run docs
- name: Checkout docs-repo
uses: actions/checkout@v3
with:
repository: rage-js/docs
token: ${{ secrets.PAT_TOKEN }}
path: rage-js-docs
ref: docs
- name: Copy docs to rage-js-docs
run: |
rm -rf rage-js-docs/docs/public/tools
mv docs tools
cp -R tools rage-js-docs/docs/public
- name: Log last docs update
run: |
touch rage-js-docs/last-update.txt
echo "Last update on docs: $(date "+%Y-%m-%d %H:%M:%S")" >> rage-js-docs/last-update.txt
- name: Commit and push changes to rage-js-docs
run: |
cd rage-js-docs
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "Github Actions"
git add .
git commit -m "Update docs"
git push origin docs --force
env:
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}