Simplify Woodpecker pipeline by consolidating when conditions and using secrets for Fly.io authentication

This commit is contained in:
2025-12-09 15:55:51 +01:00
parent af4877300f
commit fe2f61cdc2

View File

@ -1,27 +1,23 @@
when:
branch:
- main
event:
- push
steps:
deploy_frontend:
image: node:20
environment:
FLY_API_TOKEN:
from_secret: FLY_API_TOKEN
secrets: [FLY_API_TOKEN]
commands:
- curl -L https://fly.io/install.sh | sh
- export PATH="$HOME/.fly/bin:$PATH"
- flyctl deploy --config fly.toml --app gallus-pub --remote-only
when:
branch: main
event: push
deploy_backend:
image: node:20
environment:
FLY_API_TOKEN:
from_secret: FLY_API_TOKEN
secrets: [FLY_API_TOKEN]
commands:
- cd backend
- curl -L https://fly.io/install.sh | sh
- export PATH="$HOME/.fly/bin:$PATH"
- flyctl deploy --config fly.toml --app gallus-cms-backend --remote-only
when:
branch: main
event: push