Compare commits

..
2 Commits
4 changed files with 5773 additions and 3854 deletions
+30 -13
View File
@@ -7,7 +7,7 @@ on:
workflow_dispatch: workflow_dispatch:
jobs: jobs:
build-and-copy: build-and-deploy:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout code - name: Checkout code
@@ -18,17 +18,34 @@ jobs:
with: with:
node-version: "22" # match the version your project targets node-version: "22" # match the version your project targets
- name: Install pnpm - name: Build (verify it compiles)
run: npm install -g pnpm run: |
npm ci --no-audit --no-fund
npm run build
- name: Build - name: Setup SSH client
run: pnpm install && pnpm run build run: |
which rsync ssh || (apt-get update && apt-get install -y rsync openssh-client)
mkdir -p ~/.ssh
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/deploy_key
chmod 600 ~/.ssh/deploy_key
ssh-keyscan -H 82.165.141.176 >> ~/.ssh/known_hosts
- name: Copy build output to FTP server - name: Copy source to server
uses: SamKirkland/FTP-Deploy-Action@4.2.0 run: |
with: rsync -avz --delete \
server: 82.165.141.176 # LAN IP of the box running your FTP server --exclude node_modules --exclude .next --exclude out --exclude .git \
username: ${{ secrets.FTP_USER }} ./ "${{ secrets.DEPLOY_USER }}@82.165.141.176":/var/www/vhosts/dev.karlderheinz.tv/nodejs/<app-name>/
password: ${{ secrets.FTP_PASS }}
local-dir: dist/ - name: Install, build and restart on server
remote-dir: /dev.karlderheinz.tv/ run: |
ssh -i ~/.ssh/deploy_key ${{ secrets.DEPLOY_USER }}@82.165.141.176 <<'EOF'
set -e
cd /dev.karlderheinz.tv
npm ci --no-audit --no-fund
npm run build
if [ -d public ]; then
cp -r public .next/standalone/public # standalone needs your static assets copied in
fi
systemctl restart <your-plesk-unit> # or: monit restart <name>
EOF
+2 -2
View File
@@ -1,7 +1,7 @@
import type { NextConfig } from "next"; import type { NextConfig } from "next";
// next.config.ts
const nextConfig: NextConfig = { const nextConfig: NextConfig = {
/* config options here */ output: "standalone",
}; };
export default nextConfig; export default nextConfig;
+5741
View File
File diff suppressed because it is too large Load Diff
-3839
View File
File diff suppressed because it is too large Load Diff