Can't set versions #67
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: Python CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: "*" | |
workflow_dispatch: | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
env: | |
DATABASE_URL: sqlite:// | |
SECRET_KEY: something_very_secret | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install the latest version of uv | |
uses: astral-sh/setup-uv@v2 | |
with: | |
enable-cache: true | |
version: "latest" | |
- name: Collect static | |
run: uv run python manage.py collectstatic --no-input | |
- name: Run Tests | |
run: uv run pytest | |
deploy: | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.ref == 'refs/heads/main' | |
steps: | |
- name: Deploy | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.SSH_HOST }} | |
username: ${{ secrets.SSH_USERNAME }} | |
key: ${{ secrets.SSH_KEY }} | |
port: ${{ secrets.SSH_PORT }} | |
script: | | |
bash projects/surfcams/.deploy/update.sh | |