remove run names #10
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy production flows | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy-production: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository code | |
uses: actions/checkout@v4 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- run: pip install -r requirements.txt | |
- name: Get changed requirements file | |
id: changed-files-requirements | |
uses: tj-actions/changed-files@v40 | |
with: | |
files: requirements.txt | |
- name: Login to Docker Hub | |
if: steps.changed-files-requirements.outputs.any_changed == 'true' | |
uses: docker/login-action@v3 | |
with: | |
username: ${{ secrets.DOCKERHUB_USERNAME }} | |
password: ${{ secrets.DOCKERHUB_TOKEN }} | |
- name: Run step if requirements.txt changed | |
if: steps.changed-files-requirements.outputs.any_changed == 'true' | |
run: | | |
echo "Dependencies in requirements.txt have changed." | |
echo "Building and pushing docker image during deployment." | |
python select_actions.py --build build_image --push push_image --pull production | |
- name: Run step if requirements.txt did not change | |
if: steps.changed-files-requirements.outputs.any_changed == 'false' | |
run: | | |
echo "Dependencies in requirements.txt have not changed." | |
echo "Skipping image build and push." | |
python select_actions.py --build no_action --push no_action --pull production | |
- name: Deploy all flows | |
env: | |
PREFECT_API_KEY: ${{ secrets.PREFECT_API_KEY }} | |
PREFECT_API_URL: ${{ secrets.PREFECT_API_URL_PROD }} | |
run: prefect deploy --all |