Skip to content

Deploy by @MSzalowski #34

Deploy by @MSzalowski

Deploy by @MSzalowski #34

name: Build and deploy GovTool to TEST server
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:
DBSYNC_POSTGRES_DB: "cexplorer"
DBSYNC_POSTGRES_PASSWORD: "pSa8JCpQOACMUdGb"
DBSYNC_POSTGRES_USER: "postgres"
GA_CLIENT_EMAIL: ${{ secrets.GA_CLIENT_EMAIL }}
GA_PRIVATE_KEY: ${{ secrets.GA_PRIVATE_KEY }}
GRAFANA_ADMIN_PASSWORD: ${{ secrets.GRAFANA_ADMIN_PASSWORD }}
GRAFANA_SLACK_RECIPIENT: ${{ secrets.GRAFANA_SLACK_RECIPIENT }}
GRAFANA_SLACK_OAUTH_TOKEN: ${{ secrets.GRAFANA_SLACK_OAUTH_TOKEN }}
GTM_ID: ${{ secrets.GTM_ID }}
IP_ADDRESS_BYPASSING_BASIC_AUTH1: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH1 }}
IP_ADDRESS_BYPASSING_BASIC_AUTH2: ${{ secrets.IP_ADDRESS_BYPASSING_BASIC_AUTH2 }}
NEXT_PUBLIC_API_URL: "https://participation.sanchogov.tools"
NEXT_PUBLIC_GA4_PROPERTY_ID: ${{ secrets.NEXT_PUBLIC_GA4_PROPERTY_ID }}
TEST_NGINX_BASIC_AUTH: ${{ secrets.TEST_NGINX_BASIC_AUTH }}
PIPELINE_URL: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}
SENTRY_DSN: ${{ secrets.SENTRY_DSN_FRONTEND }}
SENTRY_DSN_BACKEND: ${{ secrets.SENTRY_DSN_BACKEND }}
SENTRY_IGNORE_API_RESOLUTION_ERROR: "1"
TRAEFIK_LE_EMAIL: "[email protected]"
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/[email protected]
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 }}