-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (36 loc) · 1.05 KB
/
calendar.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
name: calendar-updater
on:
schedule:
- cron: "22 */12 * * *"
workflow_dispatch: {}
jobs:
update:
runs-on: ubuntu-latest
steps:
- name: Checkout the Repo
uses: actions/checkout@v2
- name: Cache the workflow
uses: actions/cache@v2
with:
path: |
~/.cache/pip
./data
./dist
key: calendar-updater-action-cache-${{ github.run_number }}
restore-keys: calendar-updater-action-cache
- name: Install dependencies
run: pip3 install requests brotli
- name: update calendar
id: updater
run: python3 update.py
- name: Deploy to Github-Pages
if: steps.updater.outputs.new_items > 0
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: dist
CLEAN: true
GIT_CONFIG_NAME: pcrbot-bot
GIT_CONFIG_EMAIL: pcrbot-bot@users.noreply.github.com
COMMIT_MESSAGE: auto update