Skip to content

Commit b38c3be

Browse files
committed
jenkinsfile: allow deploy of dev site
Signed-off-by: markoburcul <marko@status.im>
1 parent 640798f commit b38c3be

File tree

2 files changed

+8
-3
lines changed

2 files changed

+8
-3
lines changed

Jenkinsfile

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ pipeline {
4242
script {
4343
nix.develop("""
4444
ghp-import \
45-
-b deploy-master \
46-
-c docs.status.network \
45+
-b ${deployBranch()} \
46+
-c ${deployDomain()} \
4747
-p build
4848
""",
4949
pure: false
@@ -57,4 +57,8 @@ pipeline {
5757
post {
5858
cleanup { cleanWs() }
5959
}
60-
}
60+
}
61+
62+
def isMasterBranch() { GIT_BRANCH ==~ /.*master/ }
63+
def deployBranch() { isMasterBranch() ? 'deploy-master' : 'deploy-develop' }
64+
def deployDomain() { isMasterBranch() ? 'docs.status.network' : 'dev-docs.status.network' }

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ This command generates static content into the `build` directory and can be serv
4545
## CI/CD
4646

4747
- [CI builds](https://ci.infra.status.im/job/website/job/docs.status.network/) `master` and pushes to `deploy-master` branch, which is hosted at <https://docs.status.network/>.
48+
- [CI builds dev](https://ci.infra.status.im/job/website/job/dev-docs.status.network/) `develop` and pushes to `deploy-develop` branch, which is hosted at <https://dev-docs.status.network/>.
4849

4950
The hosting is done using [Caddy server with Git plugin for handling GitHub webhooks](https://github.com/status-im/infra-misc/blob/master/ansible/roles/caddy-git).
5051

0 commit comments

Comments
 (0)