add Gitea Actions deploy workflow
Some checks failed
Deploy / deploy (push) Has been cancelled

This commit is contained in:
Chen Gu
2026-04-23 12:35:25 +08:00
parent 516528ed73
commit ab7259ff6a

View File

@@ -0,0 +1,24 @@
name: Deploy
on:
push:
branches: [main, master]
jobs:
deploy:
runs-on: self-hosted:host
steps:
- name: Clone
run: |
rm -rf /tmp/deploy-spectra-lab
git clone "https://gch3n:${{ secrets.GITEA_TOKEN }}@git.gch3n.online/gch3n/spectra-lab.git" /tmp/deploy-spectra-lab
- name: Deploy
run: |
sudo mkdir -p /var/www/spectra-lab
sudo cp -r /tmp/deploy-spectra-lab/* /var/www/spectra-lab/
sudo chown -R caddy:caddy /var/www/spectra-lab
rm -rf /tmp/deploy-spectra-lab
- name: Done
run: echo "✓ Deployed to gch3n.online/spectra-lab/"