-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #591 from the-hideout/update-deployments
Update deployments
- Loading branch information
Showing
4 changed files
with
134 additions
and
207 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,89 +31,7 @@ jobs: | |
if: ${{ steps.branch-deploy.outputs.continue == 'true' }} | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ steps.branch-deploy.outputs.ref }} | ||
|
||
# - uses: azure/login@cb79c773a3cfa27f31f25eb3f677781210c9ce3d # [email protected] | ||
# if: ${{ steps.branch-deploy.outputs.continue == 'true' }} | ||
# with: | ||
# creds: ${{ secrets.AZURE_CREDENTIALS }} | ||
|
||
# - uses: hashicorp/setup-terraform@a1502cd9e758c50496cc9ac5308c4843bcd56d36 # [email protected] | ||
# if: ${{ steps.branch-deploy.outputs.continue == 'true' }} | ||
# with: | ||
# terraform_version: 1.1.7 | ||
# cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }} | ||
|
||
# - name: Terraform init | ||
# id: init | ||
# if: ${{ steps.branch-deploy.outputs.continue == 'true' }} | ||
# working-directory: terraform/ | ||
# run: terraform init | ||
|
||
# ### NOOP DEPLOY ### | ||
|
||
# - name: Terraform fmt | ||
# if: ${{ steps.branch-deploy.outputs.continue == 'true' && steps.branch-deploy.outputs.noop == 'true' }} | ||
# working-directory: terraform/ | ||
# id: fmt | ||
# run: terraform fmt -check | ||
# continue-on-error: true | ||
|
||
# - name: Terraform validate | ||
# if: ${{ steps.branch-deploy.outputs.continue == 'true' && steps.branch-deploy.outputs.noop == 'true' }} | ||
# working-directory: terraform/ | ||
# id: validate | ||
# run: terraform validate -no-color | ||
|
||
# - name: Terraform plan | ||
# if: ${{ steps.branch-deploy.outputs.continue == 'true' && steps.branch-deploy.outputs.noop == 'true' }} | ||
# working-directory: terraform/ | ||
# id: plan | ||
# env: | ||
# 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 plan -no-color | ||
# continue-on-error: true | ||
|
||
# # Post comment on PR with development plan info | ||
# - uses: thollander/actions-comment-pull-request@v2 | ||
# if: ${{ steps.branch-deploy.outputs.continue == 'true' && steps.branch-deploy.outputs.noop == 'true' }} | ||
# env: | ||
# PLAN: "terraform ${{ steps.plan.outputs.stdout }}" | ||
# with: | ||
# message: | | ||
# `### Terraform Plan - Production (noop) 🪐 | ||
# - Terraform Format and Style 🖌: \`${{ steps.fmt.outcome }}\` | ||
# - Terraform Initialization ⚙️: \`${{ steps.init.outcome }}\` | ||
# - Terraform Validation 🤖: \`${{ steps.validate.outcome }}\` | ||
# - Terraform Plan 📖: \`${{ steps.plan.outcome }}\` | ||
|
||
# <details><summary>Show Plan</summary> | ||
|
||
# \`\`\`${process.env.PLAN}\`\`\` | ||
|
||
# </details> | ||
|
||
# In addition to the plan, the branch: \`${{ steps.branch-deploy.outputs.ref }}\` would have been deployed | ||
|
||
# > Pusher: @${{ github.actor }}, Action: \`${{ github.event_name }}\`, Working Directory: \`terraform/\`, Workflow: \`${{ github.workflow }}\``; | ||
|
||
# ##################### | ||
|
||
# ### BRANCH DEPLOY ### | ||
|
||
# - name: Terraform apply | ||
# if: ${{ steps.branch-deploy.outputs.continue == 'true' && steps.branch-deploy.outputs.noop != 'true' }} | ||
# 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 | ||
ref: ${{ steps.branch-deploy.outputs.sha }} | ||
|
||
- name: SSH Remote Deploy | ||
if: ${{ steps.branch-deploy.outputs.continue == 'true' && steps.branch-deploy.outputs.noop != 'true' }} | ||
|
@@ -124,17 +42,4 @@ jobs: | |
key: ${{ secrets.SSH_KEY }} | ||
port: ${{ secrets.SSH_PORT }} | ||
script_stop: true | ||
script: ~/tarkov-data-manager/script/deploy -r="${{ steps.branch-deploy.outputs.ref }}" -f="${{ steps.branch-deploy.outputs.fork_checkout }}" -d="tarkov-data-manager" -n="${{ steps.branch-deploy.outputs.fork_full_name }}" | ||
|
||
# - uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # [email protected] | ||
# if: ${{ steps.branch-deploy.outputs.continue == 'true' && steps.branch-deploy.outputs.noop != 'true' }} | ||
# with: | ||
# python-version: '3.10' | ||
# cache: 'pip' | ||
|
||
# - name: health | ||
# if: ${{ steps.branch-deploy.outputs.continue == 'true' && steps.branch-deploy.outputs.noop != 'true' }} | ||
# working-directory: script/health | ||
# run: | | ||
# pip install -r requirements.txt | ||
# python health.py | ||
script: ~/tarkov-data-manager/script/deploy -r "${{ steps.branch-deploy.outputs.sha }}" -f "${{ steps.branch-deploy.outputs.fork_checkout }}" -d "/home/tdm/tarkov-data-manager" -n "${{ steps.branch-deploy.outputs.fork_full_name }}" |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
deploy: | ||
if: github.event_name == 'push' | ||
environment: production | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: deployment check | ||
uses: github/[email protected] | ||
id: deployment-check | ||
with: | ||
merge_deploy_mode: "true" | ||
environment: production | ||
|
||
- uses: actions/checkout@v4 | ||
if: ${{ steps.deployment-check.outputs.continue == 'true' }} | ||
|
||
- name: SSH Remote Deploy | ||
if: ${{ steps.deployment-check.outputs.continue == 'true' }} | ||
uses: appleboy/ssh-action@7eaf76671a0d7eec5d98ee897acda4f968735a17 # [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 "/home/tdm/tarkov-data-manager" |
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