My Gatsby Deployment pipeline / build-and-deploy (push) Successful in 1m4s
Replace the single Gatsby page with a dark, terminal-style agent that answers questions about Dennis's work from one curated knowledge base. There is no model and no network call, so answers cannot be invented. A plain "Classic view" and an optional light theme sit one click away. Site - Terminal UI (React island): typed answers, tool-call lines, slash commands, autocomplete, history, deep links, a short /oncall game - Content focused on what recruiters scan for; personal and employer-internal details are left out - No profile photo anywhere, including the new link-preview card and icons - Corrected facts from the old page (dates, titles, tenses, skill tiers) Tooling - Migrate Gatsby 5 to Astro 7 (Node 22.23+); builds in about 1 second - Self-host fonts, so visitors make no request to third parties - Link-preview card, favicon set, web manifest and a service-worker clean-up for returning visitors - Deploy workflow builds with npm ci on Node 22 and uploads dist/ - Track package-lock.json Quality - Tests for routing and for markup injection from visitor input - A content guard scans every reachable answer; the list of things that must never be published lives in a git-ignored local file Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
70 lines
1.9 KiB
YAML
70 lines
1.9 KiB
YAML
name: My Gatsby Deployment pipeline
|
|
run-name: ${{ gitea.actor }} is deploying this page to production.
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
jobs:
|
|
build-and-deploy:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
# Astro needs Node 22.23 or newer; runner images can cache an older 22.x.
|
|
check-latest: true
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build Astro site
|
|
run: npm run build
|
|
env:
|
|
NODE_ENV: production
|
|
CI: true
|
|
|
|
- name: Check build output
|
|
run: |
|
|
if [ ! -f "dist/index.html" ]; then
|
|
echo "Build failed - dist/index.html not found"
|
|
exit 1
|
|
fi
|
|
|
|
- name: Install SSH key
|
|
uses: shimataro/ssh-key-action@v2
|
|
with:
|
|
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
|
known_hosts: ${{ secrets.SSH_KNOWN_HOSTS }}
|
|
|
|
- name: Install rsync
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y rsync
|
|
|
|
- name: Deploy to web server
|
|
env:
|
|
DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }}
|
|
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
|
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
|
|
run: |
|
|
rsync -avz -e "ssh -p 2266" \
|
|
--exclude='mailadmin/' \
|
|
--exclude='postfixadmin/' \
|
|
--exclude='roundcube/' \
|
|
dist/ \
|
|
$DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH
|
|
|
|
- name: Verify deployment
|
|
env:
|
|
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
|
|
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
|
|
DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }}
|
|
run: |
|
|
ssh -p 2266 $DEPLOY_USER@$DEPLOY_HOST "test -d $DEPLOY_PATH && echo 'Deployment successful' || (echo 'Deployment failed' && exit 1)"
|