preliminary ci/cd setup (horrors await me)
This commit is contained in:
33
.gitea/workflows/deploy-client.yaml
Normal file
33
.gitea/workflows/deploy-client.yaml
Normal file
@@ -0,0 +1,33 @@
|
||||
|
||||
name: Build and Deploy Frontend
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build-and-deploy:
|
||||
runs-on: docker
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Login to Registry
|
||||
run: |
|
||||
echo "${{ secrets.REGISTRY_PASSWORD }}" | docker login yourdomain.com \
|
||||
-u ${{ secrets.REGISTRY_USERNAME }} \
|
||||
--password-stdin
|
||||
|
||||
- name: Build image
|
||||
run: |
|
||||
docker build -t yourdomain.com/owner/frontend:latest .
|
||||
|
||||
- name: Push
|
||||
run: |
|
||||
docker push yourdomain.com/owner/frontend:latest
|
||||
|
||||
- name: Deploy
|
||||
run: |
|
||||
docker compose -f /path/to/docker-compose.yml pull frontend
|
||||
docker compose -f /path/to/docker-compose.yml up -d frontend
|
||||
Reference in New Issue
Block a user