Merge pull request #474 from Faalagorn/patch-1 #323
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: ci | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
environment: production | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: azure/login@de95379fe4dadc2defb305917eaa7e5dde727294 # [email protected] | |
with: | |
creds: ${{ secrets.AZURE_CREDENTIALS }} | |
- uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 # [email protected] | |
with: | |
terraform_version: 1.1.7 | |
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }} | |
- name: Terraform init | |
working-directory: terraform/ | |
run: terraform init | |
- name: Terraform apply | |
working-directory: terraform/ | |
env: | |
# Creds | |
TF_VAR_CLIENT_ID: ${{ secrets.CLIENT_ID }} | |
TF_VAR_CLIENT_SECRET: ${{ secrets.CLIENT_SECRET }} | |
TF_VAR_SUBSCRIPTION_ID: ${{ secrets.SUBSCRIPTION_ID }} | |
TF_VAR_TENANT_ID: ${{ secrets.TENANT_ID }} | |
run: terraform apply -auto-approve | |
- name: SSH Remote Deploy | |
uses: appleboy/ssh-action@55dabf81b49d4120609345970c91507e2d734799 # [email protected] | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_KEY }} | |
port: ${{ secrets.SSH_PORT }} | |
script_stop: true | |
script: ~/tarkov-data-manager/script/deploy -r="main" -d="tarkov-data-manager" | |
- uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # [email protected] | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- name: health | |
working-directory: script/health | |
run: | | |
pip install -r requirements.txt | |
python health.py |