Skip to content

Commit

Permalink
Add workflow to deploy test stack
Browse files Browse the repository at this point in the history
  • Loading branch information
mesudip committed May 17, 2024
1 parent 2f95dd3 commit 13eb52d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 2 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build-and-deploy-test-stack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build and deploy GovTool test stack
run-name: Deploy by @${{ github.actor }}

on:
push:
branches:
- test

env:
ENVIRONMENT: "test"
CARDANO_NETWORK: "sanchonet"

jobs:
deploy:
name: Deploy app
runs-on: ubuntu-latest
env:
GRAFANA_ADMIN_PASSWORD: ${{ secrets.GRAFANA_ADMIN_PASSWORD }}
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }}
GRAFANA_SLACK_OAUTH_TOKEN: ${{ secrets.GRAFANA_SLACK_OAUTH_TOKEN }}
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }}
GTM_ID: ${{ secrets.GTM_ID }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }}
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
USERSNAP_SPACE_API_KEY: ${{ secrets.USERSNAP_SPACE_API_KEY }}
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup SSH agent
uses: webfactory/ssh-agent@v0.8.0
with:
ssh-private-key: ${{ secrets.TEST_STACK_SSH_KEY }}

- name: Run Ansible playbook
uses: dawidd6/action-ansible-playbook@v2
with:
playbook: playbook.yml
directory: ./tests/test-infrastructure
key: ${{ secrets.TEST_STACK_SSH_KEY }}
inventory: |
[test_server]
${{ secrets.TEST_STACK_SERVER_IP }} ansible_user=ec2-user
options: |
--verbose
env:
GOVTOOL_TAG: ${{ github.sha }}
2 changes: 1 addition & 1 deletion .github/workflows/lighthouse.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Lighthouse
on:
workflow_run:
workflows:
- Build and deploy GovTool to TEST server
- Build and deploy GovTool test stack
types:
- completed

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_integration_playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
paths:
- .github/workflows/test_integration_playwright.yml
workflow_run:
workflows: ["Build and deploy GovTool to TEST server"]
workflows: ["Build and deploy GovTool test stack"]
types: [completed]

jobs:
Expand Down

0 comments on commit 13eb52d

Please sign in to comment.