Chore(deps): Bump vite from 5.0.10 to 5.2.8 in /frontend (#929) #220
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: Podman build & deploy | |
on: | |
push: | |
branches: | |
- develop | |
- main | |
workflow_dispatch: | |
jobs: | |
deploy-test: | |
name: Deploy to test environment | |
environment: Test | |
runs-on: tst | |
if: github.event_name == 'workflow_dispatch' || github.ref == 'refs/heads/develop' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
env: | |
# Variables | |
AML_ALLOWED_HOSTS: ${{ vars.AML_ALLOWED_HOSTS }} | |
AML_CORS_ORIGIN_WHITELIST: ${{ vars.AML_CORS_ORIGIN_WHITELIST }} | |
AML_DEBUG: ${{ vars.AML_DEBUG }} | |
AML_LOCATION_PROVIDER: ${{ vars.AML_LOCATION_PROVIDER }} | |
AML_SUBPATH: ${{ vars.AML_SUBPATH }} | |
DJANGO_SETTINGS_MODULE: ${{ vars.DJANGO_SETTINGS_MODULE }} | |
SQL_DATABASE: ${{ vars.SQL_DATABASE }} | |
SQL_HOST: ${{ vars.SQL_HOST }} | |
SQL_PORT: ${{ vars.SQL_PORT }} | |
FRONTEND_API_ROOT: ${{ vars.FRONTEND_API_ROOT }} | |
FRONTEND_EXPERIMENT_SLUG: ${{ vars.FRONTEND_EXPERIMENT_SLUG }} | |
FRONTEND_AML_HOME: ${{ vars.FRONTEND_AML_HOME }} | |
FRONTEND_HTML_PAGE_TITLE: ${{ vars.FRONTEND_HTML_PAGE_TITLE }} | |
# Secrets | |
AML_SECRET_KEY: ${{ secrets.AML_SECRET_KEY }} | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
SQL_USER: ${{ secrets.SQL_USER }} | |
SQL_PASSWORD: ${{ secrets.SQL_PASSWORD }} | |
FRONTEND_SENTRY_DSN: ${{ secrets.FRONTEND_SENTRY_DSN }} | |
DJANGO_SUPERUSER_USERNAME: ${{ secrets.DJANGO_SUPERUSER_USERNAME }} | |
DJANGO_SUPERUSER_PASSWORD: ${{ secrets.DJANGO_SUPERUSER_PASSWORD }} | |
DJANGO_SUPERUSER_EMAIL: ${{ secrets.DJANGO_SUPERUSER_EMAIL }} | |
# Prevent podman services from exiting after startup | |
RUNNER_TRACKING_ID: "" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create .env file | |
run: | | |
touch .env | |
echo "FRONTEND_API_ROOT=$FRONTEND_API_ROOT" >> .env | |
echo "FRONTEND_EXPERIMENT_SLUG=$FRONTEND_EXPERIMENT_SLUG" >> .env | |
echo "FRONTEND_AML_HOME=$FRONTEND_AML_HOME" >> .env | |
echo "FRONTEND_HTML_PAGE_TITLE=$FRONTEND_HTML_PAGE_TITLE" >> .env | |
echo "FRONTEND_SENTRY_DSN=$FRONTEND_SENTRY_DSN" >> .env | |
cp .env frontend/.env | |
- name: Build Podman images | |
run: podman-compose -f docker-compose-deploy.yml build | |
- name: Deploy Podman images | |
run: podman-compose -f docker-compose-deploy.yml up -d --force-recreate | |
- name: Notify Sentry of new release | |
run: | | |
curl -X POST "https://sentry.io/api/0/organizations/uva-aml/releases/" \ | |
-H "Authorization: Bearer ${{ secrets.SENTRY_AUTH_TOKEN }}" \ | |
-H "Content-Type: application/json" \ | |
-d '{ | |
"version": "${{ github.sha }}", | |
"refs": [{ | |
"repository": "Amsterdam-Music-Lab/MUSCLE", | |
"commit": "${{ github.sha }}" | |
}], | |
"projects": ["muscle-frontend", "muscle-backend"], | |
"environment": "test" | |
}' | |
- name: Prune old images | |
run: podman image prune -a -f | |
- name: Check Podman images | |
run: podman-compose -f docker-compose-deploy.yml ps | |
- name: Check logs | |
run: podman-compose -f docker-compose-deploy.yml logs | |
deploy-acceptance: | |
name: Deploy to acceptance environment | |
environment: Acceptance | |
runs-on: ACC | |
if: github.ref == 'refs/heads/main' || github.ref == 'refs/tags/*' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
env: | |
# Variables | |
AML_ALLOWED_HOSTS: ${{ vars.AML_ALLOWED_HOSTS }} | |
AML_CORS_ORIGIN_WHITELIST: ${{ vars.AML_CORS_ORIGIN_WHITELIST }} | |
AML_DEBUG: ${{ vars.AML_DEBUG }} | |
AML_LOCATION_PROVIDER: ${{ vars.AML_LOCATION_PROVIDER }} | |
AML_SUBPATH: ${{ vars.AML_SUBPATH }} | |
DJANGO_SETTINGS_MODULE: ${{ vars.DJANGO_SETTINGS_MODULE }} | |
SQL_DATABASE: ${{ vars.SQL_DATABASE }} | |
SQL_HOST: ${{ vars.SQL_HOST }} | |
SQL_PORT: ${{ vars.SQL_PORT }} | |
FRONTEND_API_ROOT: ${{ vars.FRONTEND_API_ROOT }} | |
FRONTEND_EXPERIMENT_SLUG: ${{ vars.FRONTEND_EXPERIMENT_SLUG }} | |
FRONTEND_AML_HOME: ${{ vars.FRONTEND_AML_HOME }} | |
FRONTEND_HTML_PAGE_TITLE: ${{ vars.FRONTEND_HTML_PAGE_TITLE }} | |
# Secrets | |
AML_SECRET_KEY: ${{ secrets.AML_SECRET_KEY }} | |
SENTRY_DSN: ${{ secrets.SENTRY_DSN }} | |
SQL_USER: ${{ secrets.SQL_USER }} | |
SQL_PASSWORD: ${{ secrets.SQL_PASSWORD }} | |
FRONTEND_SENTRY_DSN: ${{ secrets.FRONTEND_SENTRY_DSN }} | |
DJANGO_SUPERUSER_USERNAME: ${{ secrets.DJANGO_SUPERUSER_USERNAME }} | |
DJANGO_SUPERUSER_PASSWORD: ${{ secrets.DJANGO_SUPERUSER_PASSWORD }} | |
DJANGO_SUPERUSER_EMAIL: ${{ secrets.DJANGO_SUPERUSER_EMAIL }} | |
# Prevent podman services from exiting after startup | |
RUNNER_TRACKING_ID: "" | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Create .env file | |
run: | | |
touch .env | |
echo "FRONTEND_API_ROOT=$FRONTEND_API_ROOT" >> .env | |
echo "FRONTEND_EXPERIMENT_SLUG=$FRONTEND_EXPERIMENT_SLUG" >> .env | |
echo "FRONTEND_AML_HOME=$FRONTEND_AML_HOME" >> .env | |
echo "FRONTEND_HTML_PAGE_TITLE=$FRONTEND_HTML_PAGE_TITLE" >> .env | |
echo "FRONTEND_SENTRY_DSN=$FRONTEND_SENTRY_DSN" >> .env | |
cp .env frontend/.env | |
- name: Build Podman images | |
run: podman-compose -f docker-compose-deploy.yml build | |
- name: Deploy Podman images | |
run: podman-compose -f docker-compose-deploy.yml up -d --force-recreate | |
- name: Notify Sentry of new release | |
run: | | |
curl -X POST "https://sentry.io/api/0/organizations/uva-aml/releases/" \ | |
-H "Authorization: Bearer ${{ secrets.SENTRY_AUTH_TOKEN }}" \ | |
-H "Content-Type: application/json" \ | |
-d '{ | |
"version": "${{ github.sha }}", | |
"refs": [{ | |
"repository": "Amsterdam-Music-Lab/MUSCLE", | |
"commit": "${{ github.sha }}" | |
}], | |
"projects": ["muscle-frontend", "muscle-backend"], | |
"environment": "acceptance" | |
}' | |
- name: Prune old images | |
run: podman image prune -a -f | |
- name: Check Podman images | |
run: podman-compose -f docker-compose-deploy.yml ps | |
- name: Check logs | |
run: podman-compose -f docker-compose-deploy.yml logs | |