Updating CI.
Some checks failed
Deploy Greenlight API / deploy (push) Failing after 41s

This commit is contained in:
Maxime Delporte
2025-10-30 15:36:45 +01:00
parent 6e4b4c6ca4
commit e639e44d72

View File

@@ -23,6 +23,13 @@ jobs:
with: with:
go-version: "1.23" # adapte selon ta version go-version: "1.23" # adapte selon ta version
- name: Add host key to known_hosts
run: |
mkdir -p ~/.ssh
echo "${{ secrets.RUNNER_SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -p ${{ secrets.SERVER_PORT }} -H ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts
- name: Applying database migrations - name: Applying database migrations
run: | run: |
ssh -p ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "\ ssh -p ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "\
@@ -34,13 +41,6 @@ jobs:
go mod tidy go mod tidy
go build -o ./bin/greenlight-api ./cmd/api go build -o ./bin/greenlight-api ./cmd/api
- name: Add host key to known_hosts
run: |
mkdir -p ~/.ssh
echo "${{ secrets.RUNNER_SSH_KEY }}" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -p ${{ secrets.SERVER_PORT }} -H ${{ secrets.SERVER_IP }} >> ~/.ssh/known_hosts
- name: Deploy to server - name: Deploy to server
run: | run: |
ssh -p ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "rm -rf /var/www/greenlight/*" ssh -p ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "rm -rf /var/www/greenlight/*"