Add Dockerfile, docker-compose.yml and Gitea Actions workflow for CI/CD
This commit is contained in:
23
.gitea/workflows/deploy.yml
Normal file
23
.gitea/workflows/deploy.yml
Normal file
@@ -0,0 +1,23 @@
|
||||
name: CI/CD Deployment
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Deploy via SSH
|
||||
uses: appleboy/ssh-action@master
|
||||
with:
|
||||
host: ${{ secrets.DEBIAN_HOST }}
|
||||
username: ${{ secrets.DEBIAN_USER }}
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
port: 22
|
||||
script: |
|
||||
cd /opt/websitedummy
|
||||
git pull origin master || git pull origin main
|
||||
docker compose up -d --build
|
||||
Reference in New Issue
Block a user