-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (39 loc) · 1.32 KB
/
main.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
name: Nightly update from google sheet
# TODO: run nightly
on:
workflow_dispatch:
push:
branches:
- master
schedule:
# run every night at 2:42 am PST
- cron: '42 10 * * *'
jobs:
main:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- run: |
# activate virtual environment
python -m venv venv
. venv/bin/activate
python -m pip install -r requirements.txt
python3 site-generator/generate.py
python3 site-generator/kevbot.xyz.py
- uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update site
commit_options: '--no-verify'
commit_user_name: GitHub Actions
commit_user_email: github-actions[bot]@users.noreply.github.com
commit_author: GitHub Actions <github-actions[bot]@users.noreply.github.com>
file_pattern: index.html site-generator/generated/*
- uses: gacts/purge-jsdelivr-cache@v1
if: steps.auto-commit-action.outputs.changes_detected == 'true'
with:
url: |
https://cdn.jsdelivr.net/gh/kleutzinger/kleutzinger.github.io/site-generator/generated/projects.json
https://cdn.jsdelivr.net/gh/kleutzinger/kleutzinger.github.io/site-generator/kevbadge.js