This commit is contained in:
parent
7c35c7117b
commit
bf6ddf3fcc
1 changed files with 27 additions and 0 deletions
27
.forgejo/workflows/deploy.yml
Normal file
27
.forgejo/workflows/deploy.yml
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
name: Deploy Nyla
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Deploy to Infomaniak VM
|
||||
env:
|
||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
run: |
|
||||
mkdir -p ~/.ssh
|
||||
echo "$SSH_PRIVATE_KEY" > ~/.ssh/deploy_key
|
||||
chmod 600 ~/.ssh/deploy_key
|
||||
echo "StrictHostKeyChecking=no" >> ~/.ssh/config
|
||||
echo "UserKnownHostsFile=/dev/null" >> ~/.ssh/config
|
||||
ssh -i ~/.ssh/deploy_key ubuntu@porta.poweron.swiss "
|
||||
cd /srv/nyla/current &&
|
||||
git pull &&
|
||||
npm ci &&
|
||||
npm run build:prod &&
|
||||
sudo systemctl reload nginx
|
||||
"
|
||||
Loading…
Reference in a new issue