-
Notifications
You must be signed in to change notification settings - Fork 7
37 lines (34 loc) · 1.11 KB
/
events.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
name: Events Link Shortener CI
on:
schedule:
- cron: "0 * * * *"
push:
branches: [main]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: checkout repo content
uses: actions/checkout@v2 # checkout the repository content to github runner.
with:
fetch-depth: 0
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.8 #install the python needed
- name: Install script dependencies
run: pip install -r .github/workflows/scripts/requirements.txt
- name: Fetch event and render redirect # run the run.py to get the latest data
run: |
python ./.github/workflows/scripts/events_linker.py
- name: Deploy the change
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git checkout gh-pages
git add -A .
if ! git diff-index --quiet HEAD; then
git commit -m "Update Events Link"
git push
fi