From 2233c0239844b49a8323edc54b5a9636cbde2bd9 Mon Sep 17 00:00:00 2001 From: thomasabishop Date: Tue, 8 Jul 2025 16:52:21 +0100 Subject: [PATCH] fix: change deploy workflow again to not use container --- .forgejo/workflows/deploy.yaml | 41 +++++++++++++++++++++++++++++----- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/deploy.yaml b/.forgejo/workflows/deploy.yaml index aaf8f52..8d2adde 100644 --- a/.forgejo/workflows/deploy.yaml +++ b/.forgejo/workflows/deploy.yaml @@ -17,6 +17,25 @@ # chown -R www-data:www-data /var/www/systemsobscure.blog/ # +# name: Deploy Blog +# on: +# push: +# branches: [main] + +# jobs: +# deploy: +# runs-on: ubuntu-latest +# container: +# image: node:18 +# volumes: +# - /var/www:/var/www +# steps: +# - uses: actions/checkout@v3 +# - run: npm install +# - run: npm run build:posts +# - run: npm run build +# - run: cp -r dist/* /var/www/systemsobscure.blog/ + name: Deploy Blog on: push: @@ -25,13 +44,25 @@ on: jobs: deploy: runs-on: ubuntu-latest - container: - image: node:18 - volumes: - - /var/www:/var/www steps: - uses: actions/checkout@v3 + + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: "18" + cache: "npm" + - run: npm install - run: npm run build:posts - run: npm run build - - run: cp -r dist/* /var/www/systemsobscure.blog/ + + - name: Copy files via SCP + uses: appleboy/scp-action@v0.1.4 + with: + host: localhost + username: thomas + key: ${{ secrets.SSH_PRIVATE_KEY }} + source: "dist/*" + target: "/var/www/systemsobscure.blog/" + strip_components: 1