mirror of
https://github.com/EDCD/coriolis.git
synced 2025-12-10 07:05:35 +00:00
Fixed deployment steps
This commit is contained in:
20
.github/workflows/autodeploy.yml
vendored
20
.github/workflows/autodeploy.yml
vendored
@@ -13,20 +13,18 @@ env:
|
|||||||
BRANCH_NAME: ${{ github.base_ref || github.ref_name }}
|
BRANCH_NAME: ${{ github.base_ref || github.ref_name }}
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||||
jobs:
|
jobs:
|
||||||
downloadcode:
|
deploy:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- shell: bash
|
- name: Download the code
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
rm -Rf ./coriolis
|
rm -Rf ./coriolis
|
||||||
rm -Rf ./coriolis-data
|
rm -Rf ./coriolis-data
|
||||||
git clone https://github.com/Brighter-Applications/coriolis.git --single-branch --branch ${BRANCH_NAME}
|
git clone https://github.com/Brighter-Applications/coriolis.git --single-branch --branch ${BRANCH_NAME}
|
||||||
git clone https://github.com/Brighter-Applications/coriolis-data.git --single-branch --branch ${BRANCH_NAME}
|
git clone https://github.com/Brighter-Applications/coriolis-data.git --single-branch --branch ${BRANCH_NAME}
|
||||||
|
- name: Build the code
|
||||||
buildcode:
|
shell: bash
|
||||||
runs-on: self-hosted
|
|
||||||
steps:
|
|
||||||
- shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
cd coriolis-data
|
cd coriolis-data
|
||||||
export NVM_DIR=~/.nvm
|
export NVM_DIR=~/.nvm
|
||||||
@@ -34,9 +32,7 @@ jobs:
|
|||||||
npm start
|
npm start
|
||||||
cd ../coriolis
|
cd ../coriolis
|
||||||
npm run build
|
npm run build
|
||||||
movecode:
|
- name: Deploy the code
|
||||||
runs-on: self-hosted
|
shell: bash
|
||||||
steps:
|
|
||||||
- shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
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
|
if [ {BRANCH_NAME} == "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
|
||||||
|
|||||||
17
.github/workflows/manualdeploy.yml
vendored
17
.github/workflows/manualdeploy.yml
vendored
@@ -18,19 +18,18 @@ on:
|
|||||||
- live
|
- live
|
||||||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
|
||||||
jobs:
|
jobs:
|
||||||
downloadcode:
|
deploy:
|
||||||
runs-on: self-hosted
|
runs-on: self-hosted
|
||||||
steps:
|
steps:
|
||||||
- shell: bash
|
- name: Download the code
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
rm -Rf ./coriolis
|
rm -Rf ./coriolis
|
||||||
rm -Rf ./coriolis-data
|
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.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 }}
|
git clone https://github.com/Brighter-Applications/coriolis-data.git --single-branch --branch ${{ github.events.inputs.branch }}
|
||||||
buildcode:
|
- name: Build the code
|
||||||
runs-on: self-hosted
|
shell: bash
|
||||||
steps:
|
|
||||||
- shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
cd coriolis-data
|
cd coriolis-data
|
||||||
export NVM_DIR=~/.nvm
|
export NVM_DIR=~/.nvm
|
||||||
@@ -38,9 +37,7 @@ jobs:
|
|||||||
npm start
|
npm start
|
||||||
cd ../coriolis
|
cd ../coriolis
|
||||||
npm run build
|
npm run build
|
||||||
movecode:
|
- name: Deploy the code
|
||||||
runs-on: self-hosted
|
shell: bash
|
||||||
steps:
|
|
||||||
- shell: bash
|
|
||||||
run: |
|
run: |
|
||||||
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
|
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