From 25723bb24b56197cfa2d2d5ec9208c45ca8433c7 Mon Sep 17 00:00:00 2001 From: Kai Vogelgesang Date: Sun, 9 Oct 2022 15:57:23 +0200 Subject: [PATCH] Add .drone.yml, Update README with CI setup --- .drone.yml | 24 ++++++++++++++++++++++++ README.md | 28 ++++++++++++++++++++++++++++ 2 files changed, 52 insertions(+) create mode 100644 .drone.yml diff --git a/.drone.yml b/.drone.yml new file mode 100644 index 0000000..cecdb6d --- /dev/null +++ b/.drone.yml @@ -0,0 +1,24 @@ +kind: pipeline +name: default + +steps: +- name: build + image: node:alpine + commands: + - npm install + - npm run build + +- name: deploy + image: registry.eterna.leafbla.de/pelipper + settings: + ssh_key: + from_secret: rsync_key + source: build/ + destination: pelipper@oreburgh.leafbla.de:/srv/docker/party/nginx/html/${DRONE_REPO_NAME}/ + +trigger: + branch: + - main + +image_pull_secrets: +- docker_config \ No newline at end of file diff --git a/README.md b/README.md index b87cb00..0aeaa32 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,31 @@ +# API + +The API documentation is available [here](https://party.leafbla.de/api/docs) + +# CI Setup + +To enable automatic CI deployment for this repository, you need to do the following: + +1. Adapt `.drone.yml` such that the output is deployed to where you want to. + + By default, this is `.party.leafbla.de`. + +1. Enable CI for the repository in [drone](https://drone.eterna.leafbla.de/). + + Search the repository name in the search bar (you might need to click the "sync" button to make it show up) and click "activate repository" + +1. Add the required secrets so that the CI can deploy to oreburgh + - Secret Name: `rsync_key` + + Secret Value: Find "pelipper ssh key" in Bitwarden and paste the content of `id_rsa` + + - Secret Name: `docker_config` + + Secret Value: Find "Docker registry credentials" in Bitwarden and paste the content of the note. + +The next time you push to the repository, the pipeline should run. + + # Getting Started with Create React App This project was bootstrapped with [Create React App](https://github.com/facebook/create-react-app).