Skip to content

Commit 2cad93e

Browse files
feat: add stage deployment configuration and update README with staging details
1 parent 915d3aa commit 2cad93e

File tree

2 files changed

+37
-0
lines changed

2 files changed

+37
-0
lines changed

README.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,18 @@ Includes:
8787
- `deploy/deploy-prod.yaml`
8888
- `deploy/deploy-prod-rollback.yaml`
8989

90+
### Stage Deployment
91+
92+
Deployment to staging environment.
93+
94+
The deployment uses [deployer](https://deployer.org/) and [deployer-tools](https://github.com/move-elevator/deployer-tools) as deployment base.
95+
96+
Includes:
97+
- `deploy/deploy-stage.yaml`
98+
99+
> [!NOTE]
100+
> Use this template if the project wants a simple stage deployment and doesn't need an advanced feature branch deployment.
101+
90102
### Release
91103

92104
Create a GitLab release with release notes.

deploy/deploy-stage.yaml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
# Purpose:
2+
# Deploy an application on the stage system
3+
#
4+
deploy:stage:
5+
extends:
6+
- .ssh
7+
needs:
8+
- build:php
9+
- build:node
10+
stage: deploy
11+
variables:
12+
SSH_USER: ${SSH_USER_STAGE}
13+
SSH_HOST: ${SSH_HOST_STAGE}
14+
STAGE_TARGET_BRANCH: main
15+
script:
16+
- vendor/bin/dep deploy stage $DEPLOYER_CONFIG_ADDITIONAL_OPTION
17+
rules:
18+
- if: $CI_PIPELINE_SOURCE == "schedule"
19+
when: never
20+
- if: $CI_PIPELINE_SOURCE == "pipeline"
21+
when: never
22+
- if: $CI_COMMIT_REF_NAME == $STAGE_TARGET_BRANCH
23+
when: always
24+
- when: never
25+
allow_failure: false

0 commit comments

Comments
 (0)