This repository has been archived on 2026-05-09. You can view files and clone it. You cannot open issues or pull requests or push a commit.
Files
minecraft-server-ironveil/.gitea/workflows/production.yml
T
2026-02-10 18:38:13 +00:00

47 lines
1.2 KiB
YAML

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