Add Gitea Actions deploy workflow
Some checks failed
Deploy Backend / deploy (push) Failing after 1m12s
Some checks failed
Deploy Backend / deploy (push) Failing after 1m12s
This commit is contained in:
parent
373402eb1b
commit
169b1e606a
22
.gitea/workflows/deploy.yml
Normal file
22
.gitea/workflows/deploy.yml
Normal file
@ -0,0 +1,22 @@
|
||||
name: Deploy Backend
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: Install SSH client
|
||||
run: apk add --no-cache openssh-client
|
||||
- name: Setup SSH key
|
||||
env:
|
||||
SSH_KEY: ${{ secrets.DEPLOY_KEY }}
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "$SSH_KEY" > ~/.ssh/id_ed25519
|
||||
chmod 600 ~/.ssh/id_ed25519
|
||||
ssh-keyscan -p 2234 -H 87.248.133.138 >> ~/.ssh/known_hosts
|
||||
- name: Deploy
|
||||
run: ssh -p 2234 devops@87.248.133.138 'bash /opt/services/parsa/backend/deploy.sh'
|
||||
Loading…
Reference in New Issue
Block a user