Skip to content

fixed route name issue #49

fixed route name issue

fixed route name issue #49

Workflow file for this run

name: FastAPI CI/CD
on:
push:
branches: ["**"]
paths:
- "frontend/**"
pull_request:
branches: [main]
paths:
- "frontend/**"
workflow_dispatch:
jobs:
CI:
# Define the runner used in the workflow
runs-on: ubuntu-latest
steps:
# Check out repo so our workflow can access it
- uses: actions/checkout@v2
# Step-1 Setup Python
- name: Set up Python
# This action sets up a Python environment for use in actions
uses: actions/setup-python@v2
with:
python-version: 3.11
# optional: architecture: x64 x64 or x86. Defaults to x64 if not specified
# Step-2 Install Python Virtual ENV
- name: Install Python Virtual ENV
run: pip3 install virtualenv
# Step-3 Setup Virtual ENV
# https://docs.github.com/en/actions/guides/caching-dependencies-to-speed-up-workflows
- name: Virtual ENV
uses: actions/cache@v2
id: cache-venv # name for referring later
with:
path: venv # what we cache: the Virtual ENV
# The cache key depends on requirements.txt
key: ${{ runner.os }}-venv-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-venv-
# Step-4 Build a Virtual ENV, but only if it doesn't already exist
- name: Activate Virtual ENV
run: pip install --upgrade pip && python -m venv venv && source venv/bin/activate && pip3 install -r requirements.txt
if: steps.cache-venv.outputs.cache-hit != 'true'
# - name: Create archive of dependencies
# run: |
# cd venv/lib/python3.11/site-packages
# zip -r9 ../../../api.zip .
# - name: Add API files to Zip file
# run: |
# cd app
# zip -g ../api.zip -r .
# - name: Upload zip file artifact
# uses: actions/upload-artifact@v2
# with:
# name: api
# path: api.zip