updated deployment workflow to forgejo
Some checks failed
Deploy Nyla Frontend / build-and-deploy (push) Failing after 6m11s
Some checks failed
Deploy Nyla Frontend / build-and-deploy (push) Failing after 6m11s
This commit is contained in:
parent
4f2745cc2e
commit
f1234fedb3
1 changed files with 33 additions and 5 deletions
|
|
@ -1,14 +1,36 @@
|
||||||
name: Deploy Nyla
|
name: Deploy Nyla Frontend
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
|
workflow_dispatch:
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
build-and-deploy:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Checkout Code
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@v4
|
||||||
|
with:
|
||||||
|
node-version: '20'
|
||||||
|
cache: 'npm'
|
||||||
|
|
||||||
|
- name: Copy environment file
|
||||||
|
run: cp config/env-poweron-nyla-int.env .env
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: npm ci
|
||||||
|
|
||||||
|
- name: Build React app
|
||||||
|
run: npm run build:int
|
||||||
|
|
||||||
- name: Deploy to Infomaniak VM
|
- name: Deploy to Infomaniak VM
|
||||||
env:
|
env:
|
||||||
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
|
@ -18,5 +40,11 @@ jobs:
|
||||||
chmod 600 ~/.ssh/deploy_key
|
chmod 600 ~/.ssh/deploy_key
|
||||||
echo "StrictHostKeyChecking=no" >> ~/.ssh/config
|
echo "StrictHostKeyChecking=no" >> ~/.ssh/config
|
||||||
echo "UserKnownHostsFile=/dev/null" >> ~/.ssh/config
|
echo "UserKnownHostsFile=/dev/null" >> ~/.ssh/config
|
||||||
ssh-keygen -lf ~/.ssh/deploy_key
|
|
||||||
ssh -i ~/.ssh/deploy_key -v ubuntu@porta.poweron.swiss "echo connected"
|
rsync -az --delete \
|
||||||
|
-e "ssh -i ~/.ssh/deploy_key" \
|
||||||
|
./dist/ \
|
||||||
|
ubuntu@porta.poweron.swiss:/srv/nyla/current/dist/
|
||||||
|
|
||||||
|
ssh -i ~/.ssh/deploy_key ubuntu@porta.poweron.swiss \
|
||||||
|
"sudo systemctl reload nginx"
|
||||||
Loading…
Reference in a new issue