mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-08 22:33:24 +00:00
Setting up definitive workflows, automatic for when coriolis is being updated, either on its own, or along with coriolis-data and manual, for when we've updated coriolis-data and need to re-deploy.
This commit is contained in:
1
.github/workflows/autodeploy.yml
vendored
1
.github/workflows/autodeploy.yml
vendored
@@ -4,7 +4,6 @@ name: Auto-Deploy 'beta/live' Branch to beta.coliolis.io or coriolis.io
|
||||
|
||||
# Controls when the action will run. Workflow runs when the alpha branch receives a push event
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches:
|
||||
- beta
|
||||
|
||||
38
.github/workflows/manualdeploy.yml
vendored
Normal file
38
.github/workflows/manualdeploy.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
# This is a basic manual deployment workflow triggered by pushes to the beta and live branches.
|
||||
|
||||
name: Manual-Deploy 'beta/live' Branch to beta.coliolis.io or coriolis.io
|
||||
|
||||
# Controls when the action will run. Workflow runs when the alpha branch receives a push event
|
||||
on:
|
||||
workflow_dispatch:
|
||||
# Get the target branch name
|
||||
inputs:
|
||||
branch:
|
||||
type: choice
|
||||
description: 'Branch Name'
|
||||
required: true
|
||||
default: 'beta'
|
||||
# Only allow beta or live branches
|
||||
options:
|
||||
- beta
|
||||
- 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 ${{ github.events.inputs.branch }}
|
||||
git clone https://github.com/Brighter-Applications/coriolis-data.git --single-branch --branch ${{ github.events.inputs.branch }}
|
||||
cd coriolis-data
|
||||
export NVM_DIR=~/.nvm
|
||||
source ~/.nvm/nvm.sh
|
||||
npm install
|
||||
npm start
|
||||
cd ../coriolis
|
||||
npm install
|
||||
npm run build
|
||||
if [ ${{ github.events.inputs.branch }} == "beta" ]; then sudo -u www-data cp -r ./build/* /var/www/beta.coriolis.io/; else sudo -u www-data cp -r ./build/* /var/www/coriolis.io/; fi
|
||||
Reference in New Issue
Block a user