Compartmentalising the build stages in the workflows.

This commit is contained in:
Alex Williams
2024-06-21 20:19:36 +01:00
parent 2891130bad
commit fbee9e21a5
2 changed files with 22 additions and 5 deletions

View File

@@ -22,12 +22,21 @@ jobs:
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
run: |
cd coriolis-data
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
npm install
npm start
cd ../coriolis
npm install
npm run build
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
movecode:
runs-on: self-hosted
steps:
- 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

View File

@@ -27,12 +27,20 @@ jobs:
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
run: |
cd coriolis-data
export NVM_DIR=~/.nvm
source ~/.nvm/nvm.sh
npm install
npm start
cd ../coriolis
npm install
npm run build
movecode:
runs-on: self-hosted
steps:
- 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