Wire up first stab at automation
This commit is contained in:
commit
a5ffbaf902
24
.drone.yml
Normal file
24
.drone.yml
Normal file
@ -0,0 +1,24 @@
|
||||
---
|
||||
kind: pipeline
|
||||
name: publish to beta.lumbung.space
|
||||
steps:
|
||||
- name: generate new contents
|
||||
image: python:alpine
|
||||
environment:
|
||||
OUTPUT_DIR: /drone/src/output
|
||||
CALENDAR_URL: "https://cloud.lumbung.space/remote.php/dav/public-calendars/WbnHM8YdCkKT6bcT?export"
|
||||
commands:
|
||||
- ./generate.sh
|
||||
|
||||
- name: publish new contents
|
||||
image: 3wordchant/docker-cp-deploy:latest
|
||||
settings:
|
||||
host: lumbung.space
|
||||
service: beta_lumbung_space_app
|
||||
source: /drone/src/output
|
||||
dest: /src/content
|
||||
deploy_key:
|
||||
from_secret: drone_ssh_lumbung.space
|
||||
trigger:
|
||||
branch:
|
||||
- main
|
3
README.md
Normal file
3
README.md
Normal file
@ -0,0 +1,3 @@
|
||||
# pubscripts
|
||||
|
||||
Publishing automation for [beta.lumbung.space](https://beta.lumbung.space).
|
41
generate.sh
Executable file
41
generate.sh
Executable file
@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p output
|
||||
|
||||
echo "Using $OUTPUT_DIR as output directory..."
|
||||
echo "Using $CALENDAR_URL as Nextcloud calendar URL..."
|
||||
|
||||
clone_repos() {
|
||||
if ! type git > /dev/null 2>&1; then
|
||||
apk add --no-cache git
|
||||
fi
|
||||
git clone https://git.autonomic.zone/ruangrupa/lumbung-video-prototype
|
||||
git clone https://git.autonomic.zone/ruangrupa/lumbung-calendar-prototype
|
||||
}
|
||||
|
||||
install_deps() {
|
||||
cd lumbung-video-prototype
|
||||
pip install -r requirements.txt
|
||||
cd -
|
||||
|
||||
cd lumbung-calendar-prototype
|
||||
pip install -r requirements.txt
|
||||
cd -
|
||||
}
|
||||
|
||||
gen_vid() {
|
||||
cd lumbung-video-prototype
|
||||
python video-feed.py
|
||||
cd -
|
||||
}
|
||||
|
||||
gen_cal() {
|
||||
cd lumbung-calendar-prototype
|
||||
python event-feed.py
|
||||
cd -
|
||||
}
|
||||
|
||||
clone_repos
|
||||
install_deps
|
||||
gen_vid
|
||||
gen_cal
|
Reference in New Issue
Block a user