infra: add Forgejo deploy script
Some checks failed
Deploy eolas-app / deploy (push) Failing after 2s
Some checks failed
Deploy eolas-app / deploy (push) Failing after 2s
This commit is contained in:
parent
9a3a0fa7e3
commit
cd6ee5a35a
1 changed files with 18 additions and 0 deletions
18
.forgejo/workflows/deploy.yaml
Normal file
18
.forgejo/workflows/deploy.yaml
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
name: Deploy eolas-app
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
container: node-22
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- run: npm install
|
||||
- run: npm run build
|
||||
- run: |
|
||||
echo "${{ secrets.VPS_DEPLOY_USER_SSH_KEY }}" > /tmp/ssh_key
|
||||
chmod 600 /tmp/ssh_key
|
||||
ssh -i /tmp/ssh_key -o StrictHostKeyChecking=no ${{ vars.VPS_DEPLOY_USER }} "bash -c 'cd /var/www/eolas-app && rm -rf * .[^.]*'"
|
||||
scp -i /tmp/ssh_key -o StrictHostKeyChecking=no -r ./* ${{ vars.VPS_DEPLOY_USER }}:/var/www/eolas-app/
|
||||
rm /tmp/ssh_key
|
||||
Loading…
Add table
Reference in a new issue