ci: add tlsync deploy workflow
Some checks failed
tlsync-ci-deploy / build-deploy (push) Has been cancelled
Some checks failed
tlsync-ci-deploy / build-deploy (push) Has been cancelled
This commit is contained in:
parent
e0f2207848
commit
31ebb5e5f2
33
.gitea/workflows/deploy.yml
Normal file
33
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,33 @@
|
||||
name: tlsync-ci-deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Build TLSync image
|
||||
run: docker build -t cc-tlsync-ci:${{ github.sha }} .
|
||||
|
||||
- name: Configure SSH
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
printf '%s\n' "${{ secrets.DEPLOY_SSH_PRIVATE_KEY }}" > ~/.ssh/deploy_key
|
||||
chmod 600 ~/.ssh/deploy_key
|
||||
printf '%s\n' "${{ secrets.DEPLOY_KNOWN_HOSTS }}" > ~/.ssh/known_hosts
|
||||
|
||||
- name: Deploy TLSync
|
||||
run: |
|
||||
ssh -i ~/.ssh/deploy_key "${{ secrets.DEPLOY_USER }}@${{ secrets.TLSYNC_DEPLOY_HOST }}" '
|
||||
set -euo pipefail
|
||||
cd /home/kcar/tlsync
|
||||
git fetch origin master
|
||||
git reset --hard origin/master
|
||||
docker compose -p tlsync -f docker-compose.yml up -d --build
|
||||
docker compose -p tlsync -f docker-compose.yml ps
|
||||
'
|
||||
3
.gitignore
vendored
3
.gitignore
vendored
@ -10,3 +10,6 @@ data/
|
||||
.env.local
|
||||
.env.production
|
||||
core
|
||||
# Runtime logs
|
||||
*.log
|
||||
logs/
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user