Skip to content

chore: add pullpreview #2284

chore: add pullpreview

chore: add pullpreview #2284

Workflow file for this run

# Based on https://docs.github.com/en/actions/deployment/deploying-to-your-cloud-provider/deploying-to-amazon-elastic-container-service
name: PR Updated triggers
on:
pull_request:
types:
- opened
- synchronize
env:
AWS_REGION: us-east-1
jobs:
ci:
uses: ./.github/workflows/ci.yml
build-all:
uses: ./.github/workflows/ecrbuild-all.yml
secrets:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
e2e:
needs:
- build-all
# could theoretically be skipped, but in practice is always faster
# than waiting for the build-all job to finish anyway
- ci
uses: ./.github/workflows/e2e.yml
secrets:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
deploy-preview:
runs-on: ubuntu-latest
timeout-minutes: 30
# needs:
# - e2e
steps:
- uses: actions/checkout@v4
- name: Copy .env file
run: cp ./self-host/.env.example ./self-host/.env
- uses: pullpreview/action@v5
with:
# Those GitHub users will have SSH access to the servers
admins: 3mcd
# A preview environment will always exist for the main branch
always_on: main
# Use the cidrs option to restrict access to the live environments to specific IP ranges
cidrs: "0.0.0.0/0"
# PullPreview will use those 2 files when running docker-compose up
compose_files: ./self-host/docker-compose.yml,docker-compose.preview.yml
# The preview URL will target this port
default_port: 80
# Use a 512MB RAM instance type instead of the default 2GB
instance_type: nano
# Ports to open on the server
ports: 80,5432
environment:

Check failure on line 59 in .github/workflows/on_pr.yml

View workflow run for this annotation

GitHub Actions / PR Updated triggers

Invalid workflow file

The workflow is not valid. .github/workflows/on_pr.yml (Line: 59, Col: 15): Unexpected value 'environment'

Check failure on line 59 in .github/workflows/on_pr.yml

View workflow run for this annotation

GitHub Actions / PR Updated triggers

Invalid workflow file

The workflow is not valid. .github/workflows/on_pr.yml (Line: 59, Col: 15): Unexpected value 'environment'
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ env.AWS_REGION }}
PREVIEW_POSTGRES_PASSWORD: ${{ secrets.PREVIEW_POSTGRES_PASSWORD }}
PREVIEW_MINIO_ROOT_PASSWORD: ${{ secrets.PREVIEW_MINIO_ROOT_PASSWORD }}
PREVIEW_ASSETS_UPLOAD_SECRET_KEY: ${{ secrets.PREVIEW_ASSETS_UPLOAD_SECRET_KEY }}