This commit is contained in:
@@ -6,37 +6,20 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
|
||||||
name: Test
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Checkout
|
|
||||||
uses: https://gitea.com/actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Setup Go
|
|
||||||
uses: https://github.com/actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: '1.25'
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: go test ./... -race
|
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs: test
|
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Deploy to Mac Mini via SSH
|
- name: 서버에 배포
|
||||||
uses: https://github.com/appleboy/ssh-action@v1.0.3
|
uses: appleboy/ssh-action@v1
|
||||||
with:
|
with:
|
||||||
host: ${{ secrets.DEPLOY_HOST }}
|
host: ${{ secrets.SERVER_HOST }}
|
||||||
username: ${{ secrets.DEPLOY_USER }}
|
username: ${{ secrets.SERVER_USER }}
|
||||||
key: ${{ secrets.DEPLOY_SSH_KEY }}
|
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
port: ${{ secrets.DEPLOY_PORT }}
|
port: 22
|
||||||
script: |
|
script: |
|
||||||
|
export PATH=$PATH:/usr/local/bin:/opt/homebrew/bin:$HOME/.docker/bin
|
||||||
cd ${{ secrets.DEPLOY_PATH }}
|
cd ${{ secrets.DEPLOY_PATH }}
|
||||||
git pull origin main
|
git pull origin main
|
||||||
docker-compose down
|
docker compose down
|
||||||
docker-compose up -d --build
|
docker compose up -d --build
|
||||||
docker-compose logs --tail=20 server
|
docker compose logs --tail=20 server
|
||||||
|
|||||||
Reference in New Issue
Block a user