-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (55 loc) · 1.72 KB
/
generate.yaml
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
name: Generate OG images
on:
schedule:
- cron: "4 2 * * *"
workflow_dispatch:
jobs:
generate:
permissions:
# for the stefanzweifel/git-auto-commit-action step
contents: write
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Chrome
uses: browser-actions/setup-chrome@v1
with:
## using newer version results in partial render
## (white/blank space at the bottom of the screen),
## so locking version now.
## later let's look at the newly added `--timeout` flag on the Chrome CLI
chrome-version: 126
- run: chrome --version
- name: Set up Python
uses: actions/setup-python@v5
- name: Cache uv
uses: actions/cache@v4
with:
key: uv
path: ~/.cache/uv
- name: Install uv
uses: yezz123/setup-uv@v4
with:
uv-venv: "sc_www_og"
- name: Set up Python dependencies
run: |
uv pip install -r requirements.txt
- name: Run the generate images script
run: python generate-images.py
- name: Commit changes to the repo
uses: stefanzweifel/git-auto-commit-action@v5
id: auto-commit-action
with:
commit_message: "Auto-generate OG images for new servers"
file_pattern: "images/*"
commit_author: "github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>"
workflow-keepalive:
if: github.event.schedule == '0 * * * *'
runs-on: ubuntu-latest
permissions:
actions: write
steps:
- uses: liskin/gh-workflow-keepalive@v1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}