This commit is contained in:
@@ -23,10 +23,6 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
go-version: "1.23" # adapte selon ta version
|
go-version: "1.23" # adapte selon ta version
|
||||||
|
|
||||||
- name: Apply migrations
|
|
||||||
run: |
|
|
||||||
migrate -path=./migrations -database=$GREENLIGHT_DB_DSN up
|
|
||||||
|
|
||||||
- name: Build API
|
- name: Build API
|
||||||
run: |
|
run: |
|
||||||
go mod tidy
|
go mod tidy
|
||||||
@@ -48,5 +44,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
ssh -p ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "\
|
ssh -p ${{ secrets.SERVER_PORT }} ${{ secrets.SERVER_USER }}@${{ secrets.SERVER_IP }} "\
|
||||||
pkill greenlight-api || true; \
|
pkill greenlight-api || true; \
|
||||||
|
cd /var/www/greenlight; \
|
||||||
|
migrate -path=./migrations -database=$GREENLIGHT_DB_DSN up \
|
||||||
nohup /var/www/greenlight/greenlight-api > /var/www/greenlight/greenlight.log 2>&1 & \
|
nohup /var/www/greenlight/greenlight-api > /var/www/greenlight/greenlight.log 2>&1 & \
|
||||||
"
|
"
|
||||||
Reference in New Issue
Block a user