Skip to content

Commit

Permalink
devops: Add job to deploy to ug.statbus.org
Browse files Browse the repository at this point in the history
Also fix bugs in previous demo jobs.
  • Loading branch information
jhf committed Sep 10, 2024
1 parent bae49f1 commit 3b89714
Show file tree
Hide file tree
Showing 6 changed files with 78 additions and 11 deletions.
29 changes: 18 additions & 11 deletions .github/workflows/deploy-to-demo.yaml
Original file line number Diff line number Diff line change
@@ -1,19 +1,26 @@
name: Push master -> devops/deploy-to-demo
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "demo.statbus.org<-devops/deploy-to-demo"
on:
push:
branches:
- 'master'
# Allow manual deployment in github
workflow_dispatch:
push:
branches:
- "devops/deploy-to-demo"

# Deploys are serial for a deploy branch.
concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: false

jobs:
build:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: executing remote ssh commands
uses: appleboy/[email protected]
with:
ref: 'master'
ssh-key: ${{ secrets.SSH_KEY }}
- name: Push for deployment
run: |
git push --force origin HEAD:devops/deploy-to-demo
host: niue.statbus.org
username: statbus_demo
key: ${{ secrets.SSH_KEY }}
command_timeout: 60m
script: /usr/local/bin/deploy-statbus.sh
26 changes: 26 additions & 0 deletions .github/workflows/deploy-to-ug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: "ug.statbus.org<-devops/deploy-to-ug"
on:
# Allow manual deployment in github
workflow_dispatch:
push:
branches:
- devops/deploy-to-ug

# Deploys are serial for a deploy branch.
concurrency:
group: ${{ github.ref_name }}
cancel-in-progress: false

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: executing remote ssh commands
uses: appleboy/[email protected]
with:
host: niue.statbus.org
username: statbus_ug
key: ${{ secrets.SSH_KEY }}
command_timeout: 60m
script: /usr/local/bin/deploy-statbus.sh
16 changes: 16 additions & 0 deletions .github/workflows/master-to-demo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Push master -> devops/deploy-to-demo
on:
# Allow manual deployment in github
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: 'master'
ssh-key: ${{ secrets.SSH_KEY }}
- name: Push for deployment
run: |
git push --force origin HEAD:devops/deploy-to-demo
1 change: 1 addition & 0 deletions .github/workflows/master-to-dev.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
name: Push master -> devops/deploy-to-dev
on:
# Auto deploy master to dev on push to master
push:
branches:
- 'master'
Expand Down
16 changes: 16 additions & 0 deletions .github/workflows/master-to-ug.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Push master -> devops/deploy-to-ug
on:
# Allow manual deployment in github
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: 'master'
ssh-key: ${{ secrets.SSH_KEY }}
- name: Push for deployment
run: |
git push --force origin HEAD:devops/deploy-to-ug
1 change: 1 addition & 0 deletions .github/workflows/production-to-all.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,6 @@ jobs:
run: |
git push --force origin HEAD:devops/deploy-to-no
git push --force origin HEAD:devops/deploy-to-tcc
git push --force origin HEAD:devops/deploy-to-ug
git push --force origin HEAD:devops/deploy-to-ma
git push --force origin HEAD:devops/deploy-to-demo

0 comments on commit 3b89714

Please sign in to comment.