blog/.woodpecker.yml

26 lines
843 B
YAML
Raw Normal View History

2024-05-02 20:48:55 +00:00
steps:
2023-02-04 07:04:29 +00:00
build:
2024-06-27 00:17:01 +00:00
image: git.mzhang.io/michael/blog-docker-builder:ksi5l9c786i4x6sq2crsjqlmcfidvvza
environment:
- ASTRO_TELEMETRY_DISABLED=1
2023-02-04 07:04:29 +00:00
commands:
2024-06-27 00:17:01 +00:00
- mkdir /tmp
2024-06-27 00:42:02 +00:00
- npm i -g pnpm@9.4.0
- npx pnpm install --frozen-lockfile
- npx pnpm run build
2024-06-21 06:00:23 +00:00
when:
- event: push
2023-02-04 07:04:29 +00:00
deploy:
2024-06-27 00:17:01 +00:00
image: git.mzhang.io/michael/blog-docker-builder:ksi5l9c786i4x6sq2crsjqlmcfidvvza
2023-02-04 07:04:29 +00:00
commands:
2023-02-04 07:18:38 +00:00
- echo "$${SSH_SECRET_KEY}" > SSH_SECRET_KEY
2023-02-04 07:12:21 +00:00
- chmod 600 SSH_SECRET_KEY
2023-02-04 07:10:28 +00:00
- mkdir -p ~/.ssh
2024-05-02 20:51:23 +00:00
- echo "mzhang.io ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIO+RKFYjD8UjqhfOHFHNyijkbGzC4fJEIIhrBwHj+FsQ" >> ~/.ssh/known_hosts
- rsync -azrP -e "ssh -i SSH_SECRET_KEY" dist/ blogDeploy@mzhang.io:/home/blogDeploy/public
2023-08-31 08:07:03 +00:00
secrets: [SSH_SECRET_KEY]
2023-02-04 07:04:29 +00:00
when:
2024-06-21 06:00:23 +00:00
- branch: master
event: push