8856e7c273
My Gatsby Deployment pipeline / build-and-deploy (push) Successful in 4m4s
Replace the HTML5-UP "Strata" theme with a Swiss-minimal single-page design (plain CSS, Space Grotesk / Hanken Grotesk / Space Mono). Rewrite copy for current positioning: Staff Data, Analytics & AI Engineer at Swisscom, open to new work. Experience shown as a pipeline timeline; contact simplified to email + LinkedIn (drop the broken form). Prune unused deps (lightbox, FontAwesome, sass/gatsby-plugin-sass) and the old SCSS, fonts and gallery assets. Fix package.json metadata. Harden the Gitea deploy: merge build+deploy into one job (removes the deprecated artifact upload/download handoff), bump Node 18 -> 20, use npx gatsby build. Rename .nvrmc -> .nvmrc and refresh the README. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
68 lines
1.8 KiB
YAML
68 lines
1.8 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: 20
|
|
|
|
- name: Install dependencies
|
|
run: npm install --legacy-peer-deps --force
|
|
|
|
- name: Build Gatsby site
|
|
run: npx gatsby build
|
|
env:
|
|
NODE_ENV: production
|
|
CI: true
|
|
|
|
- name: Check build output
|
|
run: |
|
|
if [ ! -d "public" ]; then
|
|
echo "Build failed - public directory 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/' \
|
|
public/ \
|
|
$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)"
|