Repository navigation
69 lines (60 loc) · 1.76 KB
/
Copy pathrender.yml
File metadata and controls
69 lines (60 loc) · 1.76 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
name: Render 3D canvas
# Renders the demo images shown in this repository's README by running the action itself.
on:
push:
branches: [main]
paths:
- action.yml
- presets/**
- src/**
- package*.json
schedule:
- cron: '17 3 * * 1' # weekly, to keep the contributions demo current
workflow_dispatch:
permissions: {}
# Overlapping runs would race to push the same images.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
# Everything that runs third-party code (npm packages, headless Chrome) happens here, with a
# read-only token and no git credentials left on disk, so it cannot push or move tags.
render:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v7
with:
persist-credentials: false
- uses: ./
with:
config: object orbits text contributions
commit: 'false'
- uses: actions/upload-artifact@v7
with:
name: demo-images
path: dist/
retention-days: 1
# Only this job can write, and it runs nothing but git.
commit:
needs: render
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v7
- uses: actions/download-artifact@v8
with:
name: demo-images
path: dist/
- name: Commit images
run: |
git add dist
if git diff --cached --quiet; then
echo "The demo images are unchanged."
exit 0
fi
git -c user.name="github-actions[bot]" -c user.email="41898282+github-actions[bot]@users.noreply.github.com" \
commit --quiet -m "chore: render 3D canvas"
git push