Merge pull request #36 from bitovi/loading #38
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: Deploy | |
on: | |
push: | |
branches: [ main ] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
EC2-Deploy: | |
runs-on: ubuntu-latest | |
environment: | |
name: ${{ github.ref_name }} | |
url: ${{ steps.deploy.outputs.vm_url }} | |
steps: | |
- id: deploy | |
name: Deploy | |
uses: bitovi/[email protected] | |
with: | |
aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID_JIRA_INTEGRATIONS}} | |
aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY_JIRA_INTEGRATIONS}} | |
aws_default_region: us-east-1 | |
# Provide a secret called `DOT_ENV` to append environment variables to the .env file | |
dot_env: ${{ secrets.DOT_ENV }} | |
sub_domain: timeline-report | |
domain_name: bitovi-jira.com | |
app_port: 3000 | |
- if: ${{ steps.deploy.outputs.vm_url != '' }} | |
name: Print result created | |
run: | | |
echo "## VM Created! :rocket:" >> $GITHUB_STEP_SUMMARY | |
echo " ${{ steps.deploy.outputs.vm_url }}" >> $GITHUB_STEP_SUMMARY | |
- if: ${{ steps.deploy.outputs.vm_url == '' }} | |
name: Print result destroyed | |
run: | | |
echo "## VM Destroyed! :boom:" >> $GITHUB_STEP_SUMMARY | |
echo "Buckets and whole infrastructure should be gone now!" >> $GITHUB_STEP_SUMMARY |