steps: build: image: git.mzhang.io/michael/blog-docker-builder:x0m1c7r2qzc3qbyw8sfv5flfv75xiqdz environment: - ASTRO_TELEMETRY_DISABLED=1 commands: - mkdir /tmp - rm -rf node_modules - npm i -g pnpm@9.4.0 - npx pnpm install --frozen-lockfile - npx pnpm run build when: - event: push deploy: image: git.mzhang.io/michael/blog-docker-builder:x0m1c7r2qzc3qbyw8sfv5flfv75xiqdz commands: - echo "$${SSH_SECRET_KEY}" > SSH_SECRET_KEY - chmod 600 SSH_SECRET_KEY - mkdir -p ~/.ssh - echo "mzhang.io ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO+RKFYjD8UjqhfOHFHNyijkbGzC4fJEIIhrBwHj+FsQ" >> known_hosts - rsync -azrP -e "ssh -i SSH_SECRET_KEY -o UserKnownHostsFile=known_hosts" dist/ blogDeploy@mzhang.io:/home/blogDeploy/public secrets: [SSH_SECRET_KEY] when: - branch: master event: push