Update deployment configuration files for optimized CI/CD pipeline
- Simplified `fly.toml` by removing inline comments. - Refactored `.woodpecker.yml` pipeline syntax for better clarity and flexibility. - Adjusted `Dockerfile` to fix `dist` directory path and streamline `CMD` execution.
This commit is contained in:
@ -1,27 +1,37 @@
|
||||
pipeline:
|
||||
build:
|
||||
steps:
|
||||
- name: build
|
||||
image: node:20-alpine
|
||||
pull: true
|
||||
commands:
|
||||
- npm ci
|
||||
- npm run build
|
||||
when:
|
||||
branch: main
|
||||
event: [push, pull_request]
|
||||
deploy:
|
||||
depends_on: [build]
|
||||
image: flyio/flyctl:latest
|
||||
secrets: [fly_api_token]
|
||||
commands:
|
||||
- flyctl deploy --remote-only
|
||||
when:
|
||||
branch: main
|
||||
event: push
|
||||
branch:
|
||||
include:
|
||||
- main
|
||||
event:
|
||||
include:
|
||||
- push
|
||||
- pull_request
|
||||
|
||||
branches:
|
||||
include: [main, dev]
|
||||
- name: deploy
|
||||
image: flyio/flyctl:latest
|
||||
pull: true
|
||||
depends_on:
|
||||
- build
|
||||
secrets:
|
||||
- fly_api_token
|
||||
commands:
|
||||
- flyctl deploy --remote-only --config ./fly.toml
|
||||
when:
|
||||
branch:
|
||||
include:
|
||||
- main
|
||||
event:
|
||||
include:
|
||||
- push
|
||||
|
||||
cache:
|
||||
mount:
|
||||
- node_modules
|
||||
- .npm
|
||||
- dist
|
||||
- dist
|
||||
|
||||
Reference in New Issue
Block a user