From 1fcacbd6dc3773106adfdb4ef80d7749f4a3e023 Mon Sep 17 00:00:00 2001 From: Alex Williams Date: Thu, 13 Jun 2024 23:26:45 +0100 Subject: [PATCH] Adding autodeploy for live site --- .github/workflows/autodeploy.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/autodeploy.yml diff --git a/.github/workflows/autodeploy.yml b/.github/workflows/autodeploy.yml new file mode 100644 index 00000000..40c5bbd8 --- /dev/null +++ b/.github/workflows/autodeploy.yml @@ -0,0 +1,30 @@ +# This is a basic deployment workflow triggered by pushes to the alpha branch. + +name: Auto-Deploy 'live' Branch to coliolis.io + +# Controls when the action will run. Workflow runs when the alpha branch receives a push event +on: + workflow_dispatch: + push: + branches: + - live + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + downloadcode: + runs-on: self-hosted + steps: + - shell: bash + run: | + rm -Rf ./coriolis + rm -Rf ./coriolis-data + git clone https://github.com/Brighter-Applications/coriolis.git --single-branch --branch live + git clone https://github.com/Brighter-Applications/coriolis-data.git --single-branch --branch live + cd coriolis-data + export NVM_DIR=~/.nvm + source ~/.nvm/nvm.sh + npm install + cd ../coriolis + npm install + npm run build + sudo -u www-data cp -r ./build/* /var/www/coriolis.io/ \ No newline at end of file