From a2dc8d8a0e8fbbcee94e6d0623f23daada9a777f Mon Sep 17 00:00:00 2001 From: AM <1995am@pm.me> Date: Sun, 22 Jun 2025 16:07:30 +0200 Subject: [PATCH] deploy using scp --- .gitea/workflows/build.yml | 35 +++++++++++++++++++++++++---------- 1 file changed, 25 insertions(+), 10 deletions(-) diff --git a/.gitea/workflows/build.yml b/.gitea/workflows/build.yml index 4b58621..ecc9696 100644 --- a/.gitea/workflows/build.yml +++ b/.gitea/workflows/build.yml @@ -3,20 +3,35 @@ name: Build Node on: push: branches: - - prod + - prod pull_request: branches: - - prod + - prod workflow_dispatch: jobs: - build: + deploy: runs-on: ubuntu-latest + steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v4 - with: - node-version: 24 - cache: npm - - run: npm ci - - run: ls + - name: Setup SSH + run: | + mkdir -p ~/.ssh + echo "${{ secrets.DEPLOY_KEY }}" > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + ssh-keyscan -H "https://molnarandrei.com" >> ~/.ssh/known_hosts + + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 24 + cache: npm + + - name: Install + run: npm ci + + - name: Build + run: npm build + + - name: Deploy + run: rsync -avz --delete -e "ssh -i ~/.ssh/id_ed25519" ./build/ andrei@https://molnarandrei.com:~/www