Skip to content

Added initial s3 storage methods and refactored index handling #67

Added initial s3 storage methods and refactored index handling

Added initial s3 storage methods and refactored index handling #67

Workflow file for this run

name: Deploy Review App
on:
# Run this workflow on every PR event. Existing review apps will be updated when the PR is updated.
pull_request:
types: [opened, reopened, synchronize, closed]
env:
FLY_API_TOKEN: ${{ secrets.FLY_API_TOKEN }}
# Set these to your Fly.io organization and preferred region.
FLY_REGION: fra
FLY_ORG: personal
jobs:
review_app:
runs-on: ubuntu-latest
outputs:
url: ${{ steps.deploy.outputs.url }}
# Only run one deployment at a time per PR.
concurrency:
group: pr-${{ github.event.number }}
# Deploying apps with this "review" environment allows the URL for the app to be displayed in the PR UI.
# Feel free to change the name of this environment.
environment:
name: review
# The script in the `deploy` sets the URL output for each review app.
url: ${{ steps.deploy.outputs.url }}
steps:
- name: Get code
uses: actions/checkout@v4
- name: Install uv
uses: astral-sh/setup-uv@v5
- name: Setup Python
run: uv python install
- name: Install the project
run: uv sync --all-extras
- name: Analysing the code with pylint
run: |
uv run pylint --fail-under=9 $(git ls-files '*.py')
- name: Black validation
run: |
uv run black --check .
- name: Update fly.toml with version
run: |
uv run python utils/update_fly_toml.py
# - name: Run tests
# run: |
# export MD_PATH="$(pwd)/tmp/markdown_pages"
# mkdir -p $MD_PATH
# uv run pytest --cov-report=xml --cov-report=html --cov=lfweb -n 5 -m "not integration"
- name: Modify URL
id: modify-url
run: |
url=${{ steps.deploy.outputs.url }}
modified_url=${url#https://}
- name: Deploy PR app to Fly.io
id: deploy
uses: superfly/fly-pr-review-apps@1.2.1
with:
secrets: |
API_USERNAME=${{ secrets.API_USERNAME }}
API_PASSWORD=${{ secrets.API_PASSWORD }}
ENVIRONMENT_NAME=${{ secrets.ENVIRONMENT_NAME }}
REDIS_HOST=${{ secrets.REDIS_HOST }}
SESSION_COOKIE_DOMAIN=${{ steps.modify-url.outputs.url }}
DOORCOUNT_URL=${{ secrets.DOORCOUNT_URL}}
GOOGLE_MAPS_API_KEY=${{ secrets.GOOGLE_MAPS_API_KEY }}
ENVIRONMENT_NAME=${{ secrets.ENVIRONMENT_NAME }}
AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_ENDPOINT_URL_S3=${{ secrets.AWS_ENDPOINT_URL_S3 }}
AWS_REGION=${{ secrets.AWS_REGION }}
AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}
BUCKET_NAME=${{ secrets.BUCKET_NAME }}
ENVIRONMENT_NAME=${{ secrets.ENVIRONMENT_NAME }}