Initial commit

This commit is contained in:
2026-02-10 18:38:13 +00:00
commit a0b21c3292
7 changed files with 130 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
name: Deploy to Production
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
jobs:
deploy-to-production:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
ref: main
path: .
- name: Transfer files
uses: burnett01/rsync-deployments@7.0.1
with:
switches: -azvr --delete --exclude=".gitignore" --exclude=".git" --exclude=".gitea" --exclude="data" --exclude=".env"
path: .
remote_path: /home/${{ secrets.USERNAME }}/minecraft-server-example-folder
remote_host: ${{ secrets.HOST }}
remote_user: ${{ secrets.USERNAME }}
remote_key: ${{ secrets.KEY }}
- name: Stop container
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.host }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
cd minecraft-server-example-folder
docker compose down
- name: Start container
uses: appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.host }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
script: |
cd minecraft-server-example-folder
docker compose up -d