Run on push #2
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: Branch Deploy | |
# The workflow to execute on is comments that are newly created | |
on: | |
# issue_comment: | |
# types: [ created ] | |
workflow_dispatch: | |
push: | |
branches: | |
- feat/upgrade_rio_tiler | |
# Permissions needed for reacting and adding comments for IssueOps commands | |
permissions: | |
id-token: write # This is required for requesting the JWT | |
pull-requests: write | |
deployments: write | |
contents: write | |
checks: read | |
jobs: | |
deploy-development: | |
name: Deploy to development environment | |
defaults: | |
run: | |
working-directory: infrastructure/aws | |
# if: ${{ github.event.issue.pull_request }} # only run on pull request comments | |
runs-on: ubuntu-latest | |
steps: | |
# Execute IssueOps branch deployment logic, hooray! | |
# This will be used to "gate" all future steps below and conditionally trigger steps/deployments | |
- uses: github/branch-deploy@e01d5aa54a277a8f36d6954c5ed5a29e35d27097 # [email protected] | |
id: branch-deploy | |
# Run your deployment logic for your project here - examples seen below | |
# Checkout your projects repository based on the ref provided by the branch-deploy step | |
- uses: actions/checkout@v3 | |
if: steps.branch-deploy.outputs.continue == 'true' | |
with: | |
ref: ${{ steps.branch-deploy.outputs.ref }} | |
# - name: Configure AWS credentials | |
# uses: aws-actions/configure-aws-credentials@v2 | |
# with: | |
# role-to-assume: arn:aws:iam::444055461661:role/github-actions-role-eodc | |
# role-session-name: samplerolesession | |
# aws-region: us-west-2 | |
# - name: Set up node | |
# uses: actions/setup-node@v2 | |
# with: | |
# node-version: 18 | |
# - name: Install cdk | |
# run: npm install -g aws-cdk | |
# - name: Set up Python | |
# uses: actions/setup-python@v4 | |
# with: | |
# python-version: '3.x' | |
# - name: Install dependencies | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install -r requirements-cdk.txt | |
# # Build and deploy dev when event is pull_request | |
# - name: Build & Deploy Development | |
# run: npm run cdk -- deploy titiler-xarray-development --require-approval never | |
# if: github.event_name == 'pull_request' | |
# env: | |
# TITILER_XARRAY_PYTHONWARNINGS: ignore | |
# TITILER_XARRAY_DEBUG: True | |
# TITILER_STACK_ALARM_EMAIL: ${{ secrets.ALARM_EMAIL }} | |
# STACK_STAGE: development |