Skip to content

Deploy Staging

Deploy Staging #145

Workflow file for this run

name: Deploy Staging
on:
workflow_run:
workflows: ["Feature Build"]
types:
- completed
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
EC2-Deploy:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest
environment:
name: staging
url: ${{ steps.deploy.outputs.vm_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: staging
- name: Ensure `dist` Folder Exists
run: |
if [ ! -d "public/dist" ]; then
echo "Dist folder not found. Aborting deployment."
exit 1
fi
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
- name: Create repo_env file
run: |
echo "CLIENT_COMMIT_SHA=${{ github.sha }}" > repo_env
echo "repo_env file created with CLIENT_COMMIT_SHA=${{ github.sha }} at $(pwd)"
- name: Create Jira Connect
run: |
npm ci
npm run create:atlassian-connect -- --staging
- name: Cleanup for Deploy
run: rm -rf node_modules
- id: deploy
name: Deploy
uses: bitovi/[email protected]
with:
checkout: false
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
tf_state_bucket_destroy: true
aws_r53_enable: true
aws_r53_sub_domain_name: timeline-report-staging
aws_r53_domain_name: bitovi-jira.com
aws_elb_app_port: 3000
aws_ec2_instance_type: t3.small
aws_ec2_instance_root_vol_size: 16
repo_env: repo_env
env_ghs: ${{ secrets.DOT_ENV_MAIN }}