Skip to content

Commit

Permalink
fix logic cli install logic and add log grouping
Browse files Browse the repository at this point in the history
  • Loading branch information
neel-astro committed Sep 3, 2024
1 parent 49e36ed commit 649765e
Show file tree
Hide file tree
Showing 2 changed files with 165 additions and 38 deletions.
81 changes: 71 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Deploy to Astro
uses: astronomer/deploy-action@v0.4
uses: astronomer/deploy-action@v0.6
with:
deployment-id: <deployment id>
parse: true
Expand All @@ -112,7 +112,7 @@ In the following example, the folder `/example-dags/` is specified as the root f
```yaml
steps:
- name: Deploy to Astro
uses: astronomer/deploy-action@v0.4
uses: astronomer/deploy-action@v0.6
with:
deployment-id: <deployment id>
root-folder: /example-dags/
Expand All @@ -125,7 +125,7 @@ In the following example, the pytest located at `/tests/test-tags.py` runs befor
```yaml
steps:
- name: Deploy to Astro
uses: astronomer/deploy-action@v0.4
uses: astronomer/deploy-action@v0.6
with:
deployment-id: <deployment id>
pytest: true
Expand All @@ -139,7 +139,7 @@ In the following example, `force` is enabled and both the DAG parse and pytest p
```yaml
steps:
- name: Deploy to Astro
uses: astronomer/deploy-action@v0.4
uses: astronomer/deploy-action@v0.6
with:
deployment-id: <deployment id>
force: true
Expand Down Expand Up @@ -182,13 +182,47 @@ jobs:
build-args: |
<your-build-arguments>
- name: Deploy to Astro
uses: astronomer/deploy-action@v0.4
uses: astronomer/deploy-action@v0.6
with:
deployment-id: <deployment id>
image-name: ${{ steps.image_tag.outputs.image_tag }}

```

### Deploy a DBT project

In the following example we would be deploying the dbt project located at `dbt` folder in the Github repo

```yaml
steps:
- name: DBT Deploy to Astro
uses: astronomer/[email protected]
with:
deployment-id: <deployment id>
root-folder: dbt/
mount-path: /dbt
```
### Deploy DAGs anad DBT project from same repo
In the following example we would setup a workflow to deploy dags/images located at `astro-project` and dbt deploy from dbt project located at `dbt` folder in the same Github repo

```yaml
steps:
- name: DBT Deploy to Astro
uses: astronomer/[email protected]
with:
deployment-id: <deployment id>
root-folder: dbt/
mount-path: /dbt
- name: DAGs/Image Deploy to Astro
uses: astronomer/[email protected]
with:
deployment-id: <deployment id>
root-folder: astro-project/
parse: true
```

## Deployment Preview Templates

This section contains four workflow files that you will need in your repository to have a full Deployment Preview Cycle running for your Deployment. A Deployment Preview is an Astro Deployment that mirrors the configuration of your original Deployment. This Deployment Preview can be used to test your new pipelines changes before pushing them to your original Deployment. The scripts below will take your pipeline changes through the following flow:
Expand Down Expand Up @@ -217,7 +251,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Create Deployment Preview
uses: astronomer/deploy-action@v0.4
uses: astronomer/deploy-action@v0.6
with:
action: create-deployment-preview
deployment-id: <orginal deployment id>
Expand All @@ -242,12 +276,39 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Deploy to Deployment Preview
uses: astronomer/deploy-action@v0.4
uses: astronomer/deploy-action@v0.6
with:
action: deploy-deployment-preview
deployment-id: <orginal deployment id>
```

## DBT Deploy to Deployment Preview

```yaml
name: Astronomer - DBT Deploy code to Preview
on:
pull_request:
branches:
- main
env:
## Sets Deployment API key credentials as environment variables
ASTRO_API_TOKEN: ${{ secrets.ASTRO_API_TOKEN }}
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Deploy to Deployment Preview
uses: astronomer/[email protected]
with:
action: dbt-deploy-deployment-preview
deployment-id: <orginal deployment id>
root-folder: dbt/
mount-path: /dbt
```

## Delete Deployment Preview

```yaml
Expand All @@ -266,8 +327,8 @@ jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Create Deployment Preview
uses: astronomer/deploy-action@v0.4
- name: Delete Deployment Preview
uses: astronomer/deploy-action@v0.6
with:
action: delete-deployment-preview
deployment-id: <orginal deployment id>
Expand All @@ -292,7 +353,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Deploy to Astro
uses: astronomer/deploy-action@v0.4
uses: astronomer/deploy-action@v0.6
with:
deployment-id: <orginal deployment id>
```
Loading

0 comments on commit 649765e

Please sign in to comment.