Add Gitea Actions workflow for auto-deploy to Foundry LXC
Builds CSS and compendium packs in CI, rsyncs the system to the production Foundry server, and restarts the container on push to main. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
628f3ab76c
commit
14fe7dc663
44
.gitea/workflows/deploy.yml
Normal file
44
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,44 @@
|
||||
name: Deploy to Foundry Server
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build system
|
||||
run: npm run build
|
||||
|
||||
- name: Deploy to Foundry server
|
||||
uses: burnett01/rsync-deployments@7.0.1
|
||||
with:
|
||||
switches: -avz --delete --exclude='.git' --exclude='node_modules' --exclude='foundrydata' --exclude='.env' --exclude='.env.example' --exclude='.gitea' --exclude='.github' --exclude='.claude' --exclude='.husky' --exclude='docs' --exclude='docker-compose.yml' --exclude='test_results'
|
||||
path: ./
|
||||
remote_path: /opt/foundry/data/Data/systems/vagabond/
|
||||
remote_host: ${{ secrets.DEPLOY_HOST }}
|
||||
remote_user: root
|
||||
remote_key: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||
|
||||
- name: Fix ownership and restart Foundry
|
||||
uses: appleboy/ssh-action@v1
|
||||
with:
|
||||
host: ${{ secrets.DEPLOY_HOST }}
|
||||
username: root
|
||||
key: ${{ secrets.DEPLOY_SSH_KEY }}
|
||||
script: |
|
||||
chown -R 1000:1000 /opt/foundry/data/Data/systems/vagabond/
|
||||
cd /opt/foundry && docker compose restart foundry
|
||||
Loading…
Reference in New Issue
Block a user