Skip to content

Commit

Permalink
Merge pull request #4 from neelasha23/prod
Browse files Browse the repository at this point in the history
deployment env
  • Loading branch information
edublancas authored May 13, 2024
2 parents e3a96a4 + 3850222 commit e0d55f5
Showing 1 changed file with 61 additions and 0 deletions.
61 changes: 61 additions & 0 deletions .github/workflows/ploomber-cloud-env.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Ploomber Cloud

on:
push:
branches:
# only deploy from the main branch
- main

jobs:
deploy-to-ploomber-cloud-dev:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ploomber-cloud
- name: Deploy
env:
PLOOMBER_CLOUD_KEY: ${{ secrets.PLOOMBER_CLOUD_KEY }}
run: |
ploomber-cloud deploy --config ploomber-cloud.dev.json --watch-incremental | tee watch.log
# The --watch-incremental flag will print deployment status and deployment
# log updates to the GitHub logs.
# To learn more, visit: https://docs.cloud.ploomber.io/en/latest/user-guide/github.html

- name: Check for failure
run: |
if grep -q "Deployment failed" watch.log; then
exit 1
fi
deploy-to-ploomber-cloud-prod:
runs-on: ubuntu-latest
environment: 'prod'
needs: [deploy-to-ploomber-cloud-dev]

steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: '3.11'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ploomber-cloud
- name: Deploy
env:
PLOOMBER_CLOUD_KEY: ${{ secrets.PLOOMBER_CLOUD_KEY }}
run: |
ploomber-cloud deploy --config ploomber-cloud.prod.json --watch-incremental

0 comments on commit e0d55f5

Please sign in to comment.