Fixed deployment steps

This commit is contained in:
Alex Williams
2024-06-21 20:36:25 +01:00
parent fbee9e21a5
commit 6b9969651c
2 changed files with 15 additions and 22 deletions

View File

@@ -13,20 +13,18 @@ env:
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
jobs:
downloadcode:
deploy:
runs-on: self-hosted
steps:
- shell: bash
- name: Download the code
shell: bash
run: |
rm -Rf ./coriolis
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-data.git --single-branch --branch ${BRANCH_NAME}
buildcode:
runs-on: self-hosted
steps:
- shell: bash
- name: Build the code
shell: bash
run: |
cd coriolis-data
export NVM_DIR=~/.nvm
@@ -34,9 +32,7 @@ jobs:
npm start
cd ../coriolis
npm run build
movecode:
runs-on: self-hosted
steps:
- shell: bash
- name: Deploy the code
shell: bash
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

View File

@@ -18,19 +18,18 @@ on:
- live
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
downloadcode:
deploy:
runs-on: self-hosted
steps:
- shell: bash
- name: Download the code
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 }}
buildcode:
runs-on: self-hosted
steps:
- shell: bash
- name: Build the code
shell: bash
run: |
cd coriolis-data
export NVM_DIR=~/.nvm
@@ -38,9 +37,7 @@ jobs:
npm start
cd ../coriolis
npm run build
movecode:
runs-on: self-hosted
steps:
- shell: bash
- name: Deploy the code
shell: bash
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