Simplify Woodpecker pipeline by consolidating when conditions and using secrets for Fly.io authentication
This commit is contained in:
@ -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
|
||||
|
||||
Reference in New Issue
Block a user