-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (43 loc) · 1.39 KB
/
grab-and-render.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
name: grab-and-render
on:
schedule:
- cron: "* * * * *"
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Set up required libraries
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update
sudo apt-get install --only-upgrade libstdc++6
- name: Set up Deno
uses: denoland/setup-deno@v2
with:
deno-version: "2.1.2"
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Run grab script
run: ./grab.sh
continue-on-error: true
- name: Run render script
run: ./render.sh
continue-on-error: true
- name: Get last commit message
id: last-commit-message
run: echo "msg=$(git log -1 --pretty=%s)" >> $GITHUB_OUTPUT
- name: Commit changes if needed
if: steps.last-commit-message.outputs.msg != 'Grabbed & Rendered'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Grabbed & Rendered"
- name: Amend last commit if already committed
if: steps.last-commit-message.outputs.msg == 'Grabbed & Rendered'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Grabbed & Rendered"
commit_options: "--amend --no-edit"
push_options: "--force"
skip_fetch: true