25 lines
641 B
YAML
25 lines
641 B
YAML
name: Deploy
|
|
|
|
on:
|
|
push:
|
|
branches: [main, master]
|
|
|
|
jobs:
|
|
deploy:
|
|
runs-on: self-hosted
|
|
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/"
|