From e297cf8a0dc84597f4cec11d212ccea896d1832d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerg=C5=91=20M=C3=B3ricz?= Date: Tue, 3 Jun 2025 19:19:08 +0200 Subject: [PATCH] feat(selfhost): deploy a playwright image (#1625) --- .github/workflows/deploy-playwright.yml | 34 +++++++++++++++++++++++++ docker-compose.yaml | 3 +++ 2 files changed, 37 insertions(+) create mode 100644 .github/workflows/deploy-playwright.yml diff --git a/.github/workflows/deploy-playwright.yml b/.github/workflows/deploy-playwright.yml new file mode 100644 index 00000000..0c7bf465 --- /dev/null +++ b/.github/workflows/deploy-playwright.yml @@ -0,0 +1,34 @@ +name: Deploy Playwright to GHCR + +env: + DOTNET_VERSION: '6.0.x' + +on: + push: + branches: + - main + paths: + - apps/playwright-service-ts/** + workflow_dispatch: + +jobs: + push-app-image: + runs-on: ubuntu-latest + defaults: + run: + working-directory: './apps/playwright-service-ts' + steps: + - name: 'Checkout GitHub Action' + uses: actions/checkout@main + + - name: 'Login to GitHub Container Registry' + uses: docker/login-action@v1 + with: + registry: ghcr.io + username: ${{github.actor}} + password: ${{secrets.GITHUB_TOKEN}} + + - name: 'Build Inventory Image' + run: | + docker build . --tag ghcr.io/mendableai/playwright-service:latest + docker push ghcr.io/mendableai/playwright-service:latest \ No newline at end of file diff --git a/docker-compose.yaml b/docker-compose.yaml index d3cbb3ee..f218e990 100644 --- a/docker-compose.yaml +++ b/docker-compose.yaml @@ -46,6 +46,9 @@ x-common-env: &common-env services: playwright-service: + # NOTE: If you don't want to build the service locally, + # uncomment the build: statement and comment out the image: statement + # image: ghcr.io/mendableai/playwright-service:latest build: apps/playwright-service-ts environment: PORT: 3000