Chris Gunderson
01/03/2024, 9:23 PMChris Gunderson
01/03/2024, 9:24 PMname: Deploy a Prefect flow
on:
push:
branches:
- dev
jobs:
deploy_flow:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: Prefect Auth
uses: PrefectHQ/actions-prefect-auth@v1
with:
prefect-api-key: ${{ secrets.PREFECT_API_KEY }}
prefect-workspace: ${{ secrets.PREFECT_WORKSPACE }}
- name: Run Prefect Deploy
uses: PrefectHQ/actions-prefect-deploy@v3
with:
all-deployments: "true"
requirements-file-paths: ./requirements.txt
Chris Gunderson
01/03/2024, 9:30 PMKevin Grismore
01/03/2024, 9:37 PMprefect cloud login
and uses the --workspace
option:
--workspace -w TEXT Full handle of workspace, in format '<account_handle>/<workspace_handle>'
Chris Gunderson
01/03/2024, 9:39 PMNate
01/03/2024, 9:39 PMprefect cloud login
, perhaps we should revisit the implementation of that action
you should just have to set the env vars and do prefect cloud workspace set -w acct/handle
https://github.com/zzstoatzz/prefect-monorepo/blob/main/.github/workflows/env-separated-deploy.yml#L5-L53Kevin Grismore
01/03/2024, 9:40 PMChris Gunderson
01/03/2024, 9:43 PMChris Gunderson
01/04/2024, 8:36 PMChris Gunderson
01/04/2024, 8:37 PMNate
01/04/2024, 8:39 PMChris Gunderson
01/04/2024, 8:39 PMChris Gunderson
01/04/2024, 8:40 PMNate
01/04/2024, 8:47 PMChris Gunderson
01/04/2024, 8:49 PMdeployments:
- name: transactions
description: null
entrypoint: src/run_sod_loaders.py:Transactions
work_pool: *ny4_work_pool
parameters: {}
schedule:
cron: 01 7 * * 1-5
timezone: "America/Chicago"
Chris Gunderson
01/04/2024, 8:49 PMChris Gunderson
01/04/2024, 8:51 PMChris Gunderson
01/04/2024, 8:51 PMNate
01/04/2024, 8:56 PMNate
01/04/2024, 8:56 PMNate
01/04/2024, 8:56 PMChris Gunderson
01/04/2024, 9:08 PM