Skip to content

feat: added docker-compose and nginx configs #7

feat: added docker-compose and nginx configs

feat: added docker-compose and nginx configs #7

Workflow file for this run

name: Deploy to College Server
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: Run tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: true
- name: Download dependencies
run: go mod download
- name: Run tests
run: go test ./test/... -v -count=1
deploy:
name: Deploy via SSH
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Deploy to Server via SSH
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USERNAME }}
password: ${{ secrets.SSH_PASSWORD }}
port: 22
script: |
cd ~/cms-webb
git pull origin main
sg docker -c "docker compose up -d --build"