-
-
Notifications
You must be signed in to change notification settings - Fork 846
58 lines (55 loc) · 1.75 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: Update docs to maps-docs repo
on:
push:
branches:
- main
jobs:
update_docs:
name: Update docs on maps-docs repo
runs-on: ubuntu-latest
defaults:
run:
working-directory: maps
steps:
- name: Install ImageMagick
run: sudo apt-get install -y imagemagick
working-directory: /
- name: test convert
run: convert -version
working-directory: /
- name: Checkout maps repo
uses: actions/checkout@v4
with:
path: maps
- name: Checkout maps-docs repo
uses: actions/checkout@v4
with:
repository: rnmapbox/maps-docs
ssh-key: ${{ secrets.MAPS_DOCS_DEPLOY_KEY }}
path: maps-docs
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: oven-sh/setup-bun@v1
with:
bun-version: latest
- name: Install dependencies
run: yarn install
- name: Generate component docs into maps-docs repo
run: node scripts/doc-generate.mjs
- name: Generate example docs into maps-docs repo
run: bun scripts/example-docs.ts
- name: Setup deploy key for github deploy
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.MAPS_DOCS_DEPLOY_KEY }}
- name: Add all changed files to git and push to origin main
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Update docs from maps rnmapbox/maps@${GITHUB_SHA::7}"
git push origin main
working-directory: maps-docs
env:
GITHUB_SHA: ${{ github.sha }}