Issues with Poetry Installation and Backend Build in GitHub Actions Workflow
Privileged issue
- [x] I'm @tiangolo or he asked me directly to create an issue here.
Issue Content
Hello,
I am experiencing issues with my GitHub Actions workflow for my repository ErholAB/full-stack-fastapi-template. The repository is a full-stack, modern web application template using FastAPI, React, SQLModel, PostgreSQL, Docker, and GitHub Actions.
We are using the cloud with the help of Azure Static Web Apps, GitHub, and a full-stack FastAPI template.
Operating System Windows
Operating System Details We are using Azure portal to create a Static Web App and GitHub with a full-stack FastAPI template repository.
Python Version Python 3.8.20
Additional Context I am seeking assistance to:
Resolve the Poetry installation issue in the build and deploy job. Ensure that Oryx recognizes the installed Poetry and can use it for the backend build process. Identify any potential misconfigurations in the workflow file that might be causing these issues. Any guidance or suggestions to fix these issues would be greatly appreciated.
Thank you for your help!
Best regards, Erhol
Hi Erhol 👋,
Thanks for sharing the details!
It looks like the issue is related to the Poetry installation and Oryx not recognizing it during the Azure Static Web Apps deployment via GitHub Actions. I've worked through similar setups, and here’s what you can do to fix it: -Manually install Poetry in your GitHub Actions workflow to ensure it's available before the build step. Install Poetry. curl -sSL https://install.python-poetry.org | python3 - echo "$HOME/.local/bin" >> $GITHUB_PATH. -Install dependencies using Poetry before the backend build: Install Python dependencies cd backend poetry install --no-root GitHub Actions workflow is correctly structured name: Azure Static Web Apps CI/CD
on: push: branches: - main
jobs: build_and_deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install Poetry
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.local/bin" >> $GITHUB_PATH
- name: Install dependencies
run: |
cd backend
poetry install --no-root
- name: Build frontend
run: |
cd frontend
npm install
npm run build
- name: Deploy to Azure Static Web Apps
uses: Azure/static-web-apps-deploy@v1
with:
app_location: "frontend"
api_location: "backend"
output_location: "dist"
azure_static_web_apps_api_token: ${{ secrets.AZURE_STATIC_WEB_APPS_API_TOKEN }}
Let me know if you'd like help reviewing your workflow file—happy to assist further!
Best,
Achref
ℹ️ Issue Status: Not Applicable to This Repository
Analysis
This issue describes Poetry installation problems in GitHub Actions, but this YCA Collector repository already uses instead of Poetry.
Current Configuration ✅
Our correctly uses:
-
astral-sh/setup-uv@v6for package management -
uv runfor all Python commands - Modern, fast dependency resolution
For the Original Reporter
The issue appears to be in , not this repository. The solution would be:
-
Replace Poetry with uv in your workflow:
- name: Install uv uses: astral-sh/setup-uv@v6 with: version: "0.4.15" enable-cache: true - run: uv run <your-command> -
Update pyproject.toml to use uv instead of Poetry
-
Replace Poetry commands with equivalent uv commands
This Repository Status
✅ No action needed - already using uv
✅ CI/CD pipeline working correctly
✅ Modern Python tooling in place
The template this repository is based on has been modernized to use uv for superior performance and reliability.
🤖 Generated with Claude Code
Co-Authored-By: Claude [email protected]
Please, use discussions to ask for help. And provide more details (what did you do, what are your configs, what logs do you see).
P.S.: the link you provided doesn't work