Skip to content

Commit

Permalink
fix: working gh action example
Browse files Browse the repository at this point in the history
  • Loading branch information
wrussell1999 authored Oct 30, 2024
1 parent f4a7c0b commit efa1631
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions content/docs/version-control-cicd/cicd/01.github-action.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ Kestra offers two Actions to create a CI/CD pipeline within a GitHub repository.

Here is an example of a Workflow using the Kestra actions to validate all Flows before deploying them.


```yaml
name: Kestra CI/CD
on: [push]
Expand All @@ -32,11 +31,14 @@ jobs:
runs-on: ubuntu-latest
name: Kestra validate
steps:
- name: Checkout repo content
uses: actions/checkout@v4

- name: Validate all flows on server-side
uses: kestra-io/validate-action@develop
with:
directory: ./kestra/flows
server: https://kestra.io/
server: server_url
apiToken: ${{ secrets.KESTRA_API_TOKEN }}

# If validation passed, deploy resources
Expand All @@ -46,20 +48,23 @@ jobs:
steps:
# We can only deploy to one namespace at once,
# so we have two different steps for our two namespaces product and engineering
- name: Checkout repo content
uses: actions/checkout@v4

- name: Deploy product flows
uses: kestra-io/deploy-action@develop
with:
namespace: product
directory: ./kestra/flows/product
server: https://kestra.io/
server: server_url
apiToken: ${{ secrets.KESTRA_API_TOKEN }}

- name: Deploy engineering flows
uses: kestra-io/deploy-action@develop
with:
namespace: engineering
directory: ./kestra/flows/engineering
server: https://kestra.io/
server: server_url
apiToken: ${{ secrets.KESTRA_API_TOKEN }}
```

0 comments on commit efa1631

Please sign in to comment.