Skip to content

Commit d7b453e

Browse files
committed
devops: Configure deployment for Jordan
1 parent 28b755c commit d7b453e

File tree

3 files changed

+44
-13
lines changed

3 files changed

+44
-13
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: Push master -> devops/deploy-to-jo
2+
on:
3+
# Allow manual deployment in github
4+
workflow_dispatch:
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
with:
12+
ref: 'master'
13+
ssh-key: ${{ secrets.SSH_KEY }}
14+
- name: Push for deployment
15+
run: |
16+
git push --force origin HEAD:devops/deploy-to-jo

.github/workflows/production-to-all.yaml

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,24 @@ name: Push production -> devops/deploy-to-all
22
on:
33
push:
44
branches:
5-
- 'devops/deploy-to-production'
5+
- "devops/deploy-to-production"
66
# Allow manual deployment in github
77
workflow_dispatch:
88

99
jobs:
1010
build:
1111
runs-on: ubuntu-latest
1212
steps:
13-
- uses: actions/checkout@v3
14-
with:
15-
ref: 'devops/deploy-to-production'
16-
ssh-key: ${{ secrets.SSH_KEY }}
17-
- name: Push for deployment
18-
run: |
19-
git push --force origin HEAD:devops/deploy-to-no
20-
git push --force origin HEAD:devops/deploy-to-tcc
21-
git push --force origin HEAD:devops/deploy-to-ug
22-
git push --force origin HEAD:devops/deploy-to-ma
23-
git push --force origin HEAD:devops/deploy-to-et
24-
git push --force origin HEAD:devops/deploy-to-demo
13+
- uses: actions/checkout@v3
14+
with:
15+
ref: "devops/deploy-to-production"
16+
ssh-key: ${{ secrets.SSH_KEY }}
17+
- name: Push for deployment
18+
run: |
19+
git push --force origin HEAD:devops/deploy-to-demo
20+
git push --force origin HEAD:devops/deploy-to-et
21+
git push --force origin HEAD:devops/deploy-to-jo
22+
git push --force origin HEAD:devops/deploy-to-ma
23+
git push --force origin HEAD:devops/deploy-to-no
24+
git push --force origin HEAD:devops/deploy-to-tcc
25+
git push --force origin HEAD:devops/deploy-to-ug

devops/create-new-statbus-installation.sh

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,4 +270,18 @@ ssh $DEPLOYMENT_USER@$HOST bash <<START_STATBUS
270270
./devops/manage-statbus.sh create-users
271271
START_STATBUS
272272

273+
# Generate GitHub workflow file for deployment if it doesn't exist
274+
if [ ! -f ".github/workflows/master-to-${DEPLOYMENT_SLOT_CODE}.yaml" ]; then
275+
echo "Generating GitHub workflow file..."
276+
if [ -f ".github/workflows/master-to-demo.yaml" ]; then
277+
mkdir -p .github/workflows
278+
sed "s/demo/${DEPLOYMENT_SLOT_CODE}/g" .github/workflows/master-to-demo.yaml > ".github/workflows/master-to-${DEPLOYMENT_SLOT_CODE}.yaml"
279+
echo "Created GitHub workflow file for ${DEPLOYMENT_SLOT_CODE}"
280+
else
281+
echo "Warning: Could not find template workflow file .github/workflows/master-to-demo.yaml"
282+
fi
283+
else
284+
echo "GitHub workflow file for ${DEPLOYMENT_SLOT_CODE} already exists"
285+
fi
286+
273287
echo "Setup of ${DEPLOYMENT_SLOT_NAME}(${DEPLOYMENT_SLOT_CODE}) completed successfully!"

0 commit comments

Comments
 (0)