diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index da382a7..fd1c118 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,6 +10,22 @@ jobs: permissions: id-token: write contents: write + + services: + postgres: + image: postgres:latest + env: + POSTGRES_DB: test_db + POSTGRES_USER: postgres + POSTGRES_PASSWORD: postgres + ports: + - 5432:5432 + options: >- + --health-cmd pg_isready + --health-interval 10s + --health-timeout 5s + --health-retries 5 + steps: - name: Generate token for version incrementer app id: create_token @@ -44,6 +60,17 @@ jobs: git config --global user.name "github-actions[bot]" git config --global user.email "github-actions[bot]@users.noreply.github.com" + - name: Set required env variables + run: | + echo "DB_USER=postgres" >> $GITHUB_ENV + echo "DB_PASSWORD=postgres" >> $GITHUB_ENV + echo "DB_HOST=127.0.0.1" >> $GITHUB_ENV + echo "DB_PORT=5432" >> $GITHUB_ENV + echo "DB_NAME=test_db" >> $GITHUB_ENV + echo "SECRET_KEY=$(openssl rand -base64 32)" >> $GITHUB_ENV + echo "BASE_URL=http://localhost:8000" >> $GITHUB_ENV + echo "RESEND_API_KEY=resend_api_key" >> $GITHUB_ENV + - name: Render and Publish run: uv run quarto publish gh-pages --no-prompt --no-browser