fix ci
All checks were successful
Build and test backend / Build-backend (push) Successful in 1m26s
deploy to production / deploy-backend (push) Successful in 11s
Build and test FrontEnd / Build-frontend (push) Successful in 31s

This commit is contained in:
Debucquoy Anthony 2024-04-22 21:05:38 +02:00
parent cc51510dac
commit 1831cc7eb2
Signed by: tonitch
GPG Key ID: A78D6421F083D42E

View File

@ -14,26 +14,26 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
deploy-frontend: # deploy-frontend:
runs-on: ubuntu-latest # runs-on: ubuntu-latest
steps: # steps:
- uses: actions/checkout@v4 # - uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }} # - name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3 # uses: actions/setup-node@v3
working-directory: ./frontend # working-directory: ./frontend
- run: npm ci # - run: npm ci
name: clean install # name: clean install
working-directory: ./frontend # working-directory: ./frontend
- name: building # - name: building
working-directory: ./frontend # working-directory: ./frontend
run: npm run build # run: npm run build
- name: pushing to the server # - name: pushing to the server
working-directory: ./frontend # working-directory: ./frontend
run: | # run: |
echo "${{ secrets.SSH_KEY }}" > key # echo "${{ secrets.SSH_KEY }}" > key
chmod 0600 key # chmod 0600 key
scp -o "StrictHostKeyChecking=no" -o "LogLevel=ERROR" -i key -r dist/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}: # scp -o "StrictHostKeyChecking=no" -o "LogLevel=ERROR" -i key -r dist/ ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:
- run: echo "The website has been deployed. visit https://clyde.herisson.ovh/" # - run: echo "The website has been deployed. visit https://clyde.herisson.ovh/"
deploy-backend: deploy-backend:
runs-on: ubuntu-latest runs-on: ubuntu-latest
@ -46,5 +46,5 @@ jobs:
scp -o "StrictHostKeyChecking=no" -o "LogLevel=ERROR" -i key -r * ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:api/ scp -o "StrictHostKeyChecking=no" -o "LogLevel=ERROR" -i key -r * ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }}:api/
- name: restarting the backend - name: restarting the backend
run: | run: |
ssh -o "StrictHostKeyChecking=no" -o "LogLevel=ERROR" -i key ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} 'cd api/ && sed -i compose.yaml -e "s/8080:8080/4001:8080/" -e "s/8000:8080/4000:8080/" && docker-compose up --force-recreate --build -d' ssh -o "StrictHostKeyChecking=no" -o "LogLevel=ERROR" -i key ${{ secrets.SSH_USER }}@${{ secrets.SSH_HOST }} 'cd api/ && sed -i compose.yaml -e "s/8080:8080/4001:8080/" -e "s/8000:8080/4000:8080/" && docker-compose up -e VITE_CLYDE_MODE=prod --force-recreate --build -d'
- run: echo "The backend has been deployed. running at https://clyde.herisson.ovh/api" - run: echo "The backend has been deployed. running at https://clyde.herisson.ovh/api"