Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update GitHub actions versions and formatting in CI/CD deploy docs page #15667

Merged
merged 4 commits into from
Oct 29, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 28 additions & 34 deletions docs/3.0/deploy/infrastructure-concepts/deploy-ci-cd.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ For reference, the examples below live in their respective branches of

```
.
├── .github/
└── workflows/
└── deploy-prefect-flow.yaml
├── flow.py
└── requirements.txt
| -- .github/
| |-- workflows/
| |-- deploy-prefect-flow.yaml
|-- flow.py
|-- requirements.txt
```

`flow.py`
Expand Down Expand Up @@ -120,7 +120,7 @@ For reference, the examples below live in their respective branches of
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Prefect Deploy
env:
Expand All @@ -135,12 +135,12 @@ For reference, the examples below live in their respective branches of

```
.
├── .github/
└── workflows/
└── deploy-prefect-flow.yaml
├── flow.py
├── prefect.yaml
└── requirements.txt
|-- .github/
| |-- workflows/
| |-- deploy-prefect-flow.yaml
|-- flow.py
|-- prefect.yaml
|-- requirements.txt
```

`flow.py`
Expand Down Expand Up @@ -213,7 +213,7 @@ For reference, the examples below live in their respective branches of
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Prefect Deploy
env:
Expand Down Expand Up @@ -244,11 +244,11 @@ Successfully pushed image '***/cicd-example:latest'
Successfully created/updated all deployments!

Deployments
┏━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━┓
Name Status Details
┡━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━┩
hello/my-deployment applied
└─────────────────────┴─────────┴─────────┘
|-----------------------------------------|
| Name | Status Details |
|---------------------|---------|---------|
| hello/my-deployment | applied | |
|-----------------------------------------|

```

Expand Down Expand Up @@ -292,12 +292,12 @@ separated across projects and environments.

```
.
├── cicd-example-workspaces-prod # production bucket
├── project_1
└── project_2
└── cicd-example-workspaces-stg # staging bucket
├── project_1
└── project_2
|--- cicd-example-workspaces-prod # production bucket
| |--- project_1
| |---project_2
|---cicd-example-workspaces-stg # staging bucket
|--- project_1
|---project_2
```

Deployments in this example use S3 for code storage. So it's important that push steps place flow files
Expand All @@ -316,15 +316,10 @@ so Python packages do not have to be downloaded on repeat workflow runs.
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
cache: "pip"
```

```
Using cached prefect-3.0.0-py3-none-any.whl (2.9 MB)
Using cached prefect_aws-0.4.18-py3-none-any.whl (61 kB)
```

The `build-push-action` for building Docker images also offers
[caching options for GitHub Actions](https://docs.docker.com/build/cache/backends/gha/).
If you are not using GitHub, other remote [cache backends](https://docs.docker.com/build/cache/backends/)
Expand Down Expand Up @@ -395,7 +390,7 @@ jobs:
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"

- name: Prefect Auth
uses: PrefectHQ/actions-prefect-auth@v1
Expand All @@ -404,7 +399,7 @@ jobs:
prefect-workspace: ${{ secrets.PREFECT_WORKSPACE }}

- name: Run Prefect Deploy
uses: PrefectHQ/actions-prefect-deploy@v3
uses: PrefectHQ/actions-prefect-deploy@v4
with:
deployment-names: my-deployment
requirements-file-paths: requirements.txt
Expand All @@ -429,5 +424,4 @@ registry URL to the `registry` key in the `with:` part of the action and use an

## See also

Check out the [Prefect Cloud Terraform provider](https://registry.terraform.io/providers/PrefectHQ/prefect/latest/docs/guides/getting-started)
if you're using Terraform to manage your infrastructure.
If you're using Terraform to manage your infrastructure, check out the [Prefect Cloud Terraform provider](https://registry.terraform.io/providers/PrefectHQ/prefect/latest/docs/guides/getting-started).
Loading