Remove CI-CD and use Deploy
Some checks failed
Deploy with Docker Compose / deploy (push) Has been cancelled
Some checks failed
Deploy with Docker Compose / deploy (push) Has been cancelled
This commit is contained in:
@@ -1,57 +0,0 @@
|
||||
name: CI/CD
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build-backend:
|
||||
name: Build & Test Backend
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Go
|
||||
uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version-file: backend/go.mod
|
||||
cache-dependency-path: backend/go.sum
|
||||
|
||||
- name: Build
|
||||
run: cd backend && go build ./...
|
||||
|
||||
- name: Test
|
||||
run: cd backend && go test ./...
|
||||
|
||||
build-frontend:
|
||||
name: Build Frontend
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '22'
|
||||
cache: npm
|
||||
cache-dependency-path: vue/package-lock.json
|
||||
|
||||
- name: Install dependencies
|
||||
run: cd vue && npm ci
|
||||
|
||||
- name: Build
|
||||
run: cd vue && npm run build
|
||||
|
||||
deploy:
|
||||
name: Deploy
|
||||
runs-on: self-hosted
|
||||
needs: [build-backend, build-frontend]
|
||||
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
|
||||
steps:
|
||||
- name: Pull latest & redeploy
|
||||
run: |
|
||||
cd /home/adamf/Coding/web_server
|
||||
git pull origin main
|
||||
docker compose up --build -d
|
||||
Reference in New Issue
Block a user