-
Notifications
You must be signed in to change notification settings - Fork 18
40 lines (33 loc) · 1.02 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: Staging Rollout
on:
push:
branches: [master]
schedule:
- cron: '0 2 * * *' # every day at 2:00 UTC
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install hugo
run: |
cd /tmp/
wget https://github.com/gohugoio/hugo/releases/download/v0.55.6/hugo_0.55.6_Linux-64bit.tar.gz
tar xf hugo_0.55.6_Linux-64bit.tar.gz
sudo ln -s $(pwd)/hugo /usr/bin/hugo
cd -
- name: Fetch calendar
run: |
pip install icalevents
wget https://github.com/pka/ical2json/raw/main/ical_to_json.py
python ical_to_json.py https://calendar.fossgis.de/fossgis-verein.ical >data/fossgis_verein.json
- name: Build site
run: |
hugo
- name: Rollout site
env:
SSH_KEY: ${{ secrets.SSH_KEY }}
run: |
eval $(ssh-agent -s)
ssh-add - <<< "${SSH_KEY}"
rsync --exclude=/w --delete -r -e "ssh -o StrictHostKeyChecking=no -p 22" public/ [email protected]:/