debian packages
Some checks failed
Deploy website to VPS / build-and-deploy (push) Failing after 1m0s

This commit is contained in:
Evan Scamehorn
2026-01-07 17:13:35 -06:00
parent 3f205c2a94
commit a71126ea29

View File

@@ -20,7 +20,8 @@ jobs:
- name: Install System Dependencies
run: |
apk add --no-cache rsync openssh-client bash git
apt-get update
apt-get install -y rsync openssh-client git ca-certificates
- name: Setup Node.js
uses: actions/setup-node@v4
@@ -34,11 +35,15 @@ jobs:
- name: Get Hugo Version
run: |
if [ -f "hugoblox.yaml" ]; then
# Extract version from your config file
VERSION=$(grep "hugo_version" hugoblox.yaml | awk '{print $2}' | tr -d "'\"")
echo "HUGO_VERSION=$VERSION" >> $GITHUB_ENV
else
# Fallback if file doesn't exist
echo "HUGO_VERSION=0.125.0" >> $GITHUB_ENV
fi
- name: Install dependencies
- name: Install Node Dependencies
run: |
if [ -f "package.json" ]; then
pnpm install --no-frozen-lockfile || npm install
@@ -51,8 +56,10 @@ jobs:
extended: true
- name: Build with Hugo
env:
HUGO_ENVIRONMENT: production
run: |
# Use your actual domain here
# Replace with your actual domain
hugo --minify --baseURL "https://ejs.cam/"
- name: Generate Pagefind search index
@@ -64,18 +71,24 @@ jobs:
- name: Deploy via Rsync
env:
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIVATE_KEY }}
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: ${{ secrets.REMOTE_USER }}
REMOTE_PORT: ${{ secrets.REMOTE_PORT }}
run: |
# Setup SSH
# 1. Prepare SSH Directory
mkdir -p ~/.ssh
chmod 700 ~/.ssh
# 2. Load the Private Key
echo "$SSH_PRIVATE_KEY" > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
# Scan host key to prevent MITM prompts
ssh-keyscan -p ${{ secrets.REMOTE_PORT }} ${{ secrets.REMOTE_HOST }} >> ~/.ssh/known_hosts
# 3. Add host to known_hosts to prevent interactive prompt
ssh-keyscan -p "$REMOTE_PORT" "$REMOTE_HOST" >> ~/.ssh/known_hosts
# Sync files
# --delete ensures old files are removed from /var/www
# 4. Sync files to NixOS /var/www
# Note: the trailing slash on ./public/ means "contents of public"
rsync -avz --delete \
-e "ssh -p ${{ secrets.REMOTE_PORT }}" \
-e "ssh -p $REMOTE_PORT" \
./public/ \
${{ secrets.REMOTE_USER }}@${{ secrets.REMOTE_HOST }}:/var/www/
$REMOTE_USER@$REMOTE_HOST:/var/www/