-
-
Notifications
You must be signed in to change notification settings - Fork 242
46 lines (44 loc) · 1.29 KB
/
render-docs-svg.yml
File metadata and controls
46 lines (44 loc) · 1.29 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
name: Render files in ./docs-pg to SVG
on:
push:
branches:
- master
paths:
- "docs-pg/**"
workflow_dispatch:
jobs:
render-svg:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- name: Install Project Graph
run: |
gh release download -p "*.deb" -O project-graph.deb --clobber
sudo apt-get update
sudo apt-get install -y ./project-graph.deb
rm -rf ./project-graph.deb
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Install xvfb
run: sudo apt-get install -y xvfb
- name: Render SVG files
run: |
cd docs-pg
for file in *.json; do
echo "Rendering $file"
xvfb-run -a project-graph "$file" -o "${file%.json}.svg"
done
- name: Commit files
run: |
git add .
git config --local user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
git commit -a -m "📝 Render SVG files"
git pull
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: ${{ github.ref }}