klip/.drone.yml

38 lines
940 B
YAML

kind: pipeline
name: klip
trigger:
branch:
- develop
steps:
- name: "install external dependencies"
image: ubuntu
pull: if-not-exists
commands:
- ln -fs /usr/share/zoneinfo/America/Chicago /etc/localtime
- DEBIAN_FRONTEND=noninteractive apt-get -qq update && apt-get -yq -o=Dpkg::Use-Pty=0 install redis-server postgresql --no-install-recommends
- pg_ctlcluster 12 main start
- su - postgres
- psql -U postgres -c "CREATE USER klip WITH PASSWORD 'klip' SUPERUSER;"
- name: "configure .env"
image: ubuntu
pull: if-not-exists
commands:
- cp .example.env .env
- sed -i "/DB_USER=/c\DB_USER=klip" .env
- sed -i "/DB_PASSWORD=/c\DB_PASSWORD=klip" .env
- name: "install node dependencies"
image: node
pull: if-not-exists
commands:
- npm install
- name: "build"
image: node
pull: if-not-exists
commands:
- npm run build