{"id":45037925,"url":"https://github.com/livecycle/preevy-up-action","last_synced_at":"2026-02-19T07:17:50.019Z","repository":{"id":162822292,"uuid":"635656395","full_name":"livecycle/preevy-up-action","owner":"livecycle","description":"A GitHub action to run the `preevy up` command","archived":false,"fork":false,"pushed_at":"2024-02-06T13:24:41.000Z","size":33,"stargazers_count":8,"open_issues_count":1,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2026-02-11T18:25:02.937Z","etag":null,"topics":["docker","docker-compose","kubernetes","preevy","preview-environment"],"latest_commit_sha":null,"homepage":"https://github.com/marketplace/actions/preevy-up","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/livecycle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-05-03T07:07:08.000Z","updated_at":"2025-08-31T07:05:44.000Z","dependencies_parsed_at":"2024-11-15T00:57:47.902Z","dependency_job_id":"8d9956c5-5d71-42d8-b4c1-dfbb2c3373ef","html_url":"https://github.com/livecycle/preevy-up-action","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"purl":"pkg:github/livecycle/preevy-up-action","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livecycle%2Fpreevy-up-action","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livecycle%2Fpreevy-up-action/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livecycle%2Fpreevy-up-action/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livecycle%2Fpreevy-up-action/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/livecycle","download_url":"https://codeload.github.com/livecycle/preevy-up-action/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/livecycle%2Fpreevy-up-action/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29606150,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-19T06:47:36.664Z","status":"ssl_error","status_checked_at":"2026-02-19T06:45:47.551Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker","docker-compose","kubernetes","preevy","preview-environment"],"created_at":"2026-02-19T07:17:49.478Z","updated_at":"2026-02-19T07:17:50.011Z","avatar_url":"https://github.com/livecycle.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Deploy preview environment using preevy\n\n## About Preevy\n\nPreevy is a powerful CLI tool designed to simplify the process of creating ephemeral preview environments.\nUsing Preevy, you can easily provision any [Docker Compose](https://docs.docker.com/compose/) application using any Kubernetes server or affordable VMs on [AWS Lightsail](https://aws.amazon.com/free/compute/lightsail), [Google Cloud](https://cloud.google.com/compute/) or [Azure VM](https://azure.microsoft.com/en-us/products/virtual-machines/).\n\nVisit The full documentation here: https://preevy.dev/\n\n## About the preevy-up action\n\nUse this action to build and deploy a preview environment using the Preevy CLI whenever a GitHub PR is created or updated.\n\nPreevy's [GitHub plugin](https://preevy.dev/github-plugin) will automatically add a comment to your PR with links to the deployed services.\n\nMore information about running Preevy from CI [over here](https://preevy.dev/ci/).\n\nUse [preevy-down action](https://github.com/marketplace/actions/preevy-down) to remove the preview environment when the PR is merged or closed.\n\n## Permissions\n\nPreevy requires the following [GitHub Actions permissions](https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs):\n\n* `contents: read`: used by Preevy to read the Docker Compose file(s)\n* `pull-requests: write`: used by the Preevy GitHub plugin to write a comment with the deployed URLs on the PR\n\nIn addition, if you're using GitHub's OIDC Token endpoint to authenticate to your cloud provider (as in the below examples), `id-token: write`: is also needed.\n\n## Inputs\n\n### `profile-url`\n\n*required*: `true`\n\nThe profile url created by the CLI, [as detailed in the docs](https://preevy.dev/ci/).\n\n### `args`\n\n*required*: `false`\n\nOptional additional args to the `preevy up` command, see the full reference [here](https://preevy.dev/cli-reference/#preevy-up-service).\n\n### `version`\n\n*required*: `false`\n\nThe preevy [CLI version](https://www.npmjs.com/package/preevy?activeTab=versions) to use. Defaults to `latest`.\n\n***Note*** Since `v2.1.0`, this action requires Preevy CLI version `v0.0.58` or newer. To use an older version of the CLI, use `livecycle/preevy-up-action@v2.0.0`.\n\n### `docker-compose-yaml-paths`\n\n*required*: `false`\n\nOptional path to the `docker-compose.yaml` file. If not provided, uses the working directory. If you have multiple docker compose files, you can add them as a comma seperated string like so `'docker-compose.yml,docker-compose.dev.yml'`\n\n### `install`\n\n*required*: `false`\n\n***EXPERIMENTAL***. Installation method for the Preevy CLI. Specify `gh-release` to install Preevy from a binary file, which is much faster than using NPM. Specify `none` to skip the installation steps. The default is `npm` which will install from NPM.\n\nIf `gh-release` is specified, `version` can be either `latest` or one of the [released versions](https://github.com/livecycle/preevy/releases). Canary versions are not supported.\n\n### `node-cache`\n\n*required*: `false`\n\nNode package manager used for caching. Supported values: `npm`, `yarn`, `pnpm`, or ''. [Details](https://github.com/actions/setup-node/blob/main/docs/advanced-usage.md#caching-packages-data). Default: `npm`.\n\n### `working-directory`\n\n*required*: `false`\n\nSpecifies the working directory where the Preevy CLI is run\n\n## Outputs\n\n### `urls-map`\n\nThe generated preview environment urls, formatted as a JSON map.\n\nExample (formatted for clarity):\n\n```json\n{\n  \"backend\": {\n    \"80\": \"https://backend-80-my-compose-project-demo-pr-abc1234.livecycle.run/\",\n    \"9230\": \"https://backend-9230-my-compose-project-demo-pr-abc1234.livecycle.run/\"\n  },\n  \"frontend\": {\n    \"3000\": \"https://frontend-my-compose-project-demo-pr-abc1234.livecycle.run/\"\n  }\n}\n```\n\nThe URL for a specific service and port can be expressed in the job as\n\n```\n${{ fromJson(steps.STEP_ID.outputs.urls-map).SERVICE_NAME[PORT] }}\n```\n\nFor example:\n\n```\n${{ fromJson(steps.preevy.outputs.urls-map).frontend[3000] }}\n```\n\nSee examples below.\n\n### `urls-json`\n\nThe generated preview environment URLs, formatted as a JSON array.\n\nExample (formatted for clarity):\n\n```json\n[\n  {\n    \"project\": \"my-compose-project\",\n    \"service\": \"frontend\",\n    \"port\": 3000,\n    \"url\": \"https://frontend-my-compose-project-demo-pr-abc1234.livecycle.run/\"\n  },\n  {\n    \"project\": \"my-compose-project\",\n    \"service\": \"backend\",\n    \"port\": 80,\n    \"url\": \"https://backend-80-my-compose-project-demo-pr-abc1234.livecycle.run/\"\n  },\n  {\n    \"project\": \"my-compose-project\",\n    \"service\": \"backend\",\n    \"port\": 9230,\n    \"url\": \"https://backend-9230-my-compose-project-demo-pr-abc1234.livecycle.run/\"\n  }\n]\n```\n\n\n## Examples\n\n### Build and deploy on AWS Lightsail\n\nThe following features are shown:\n\n* [Configuring AWS credentials](https://github.com/aws-actions/configure-aws-credentials) using GitHub's OIDC provider\n* Creating a [GitHub environment URL](https://docs.github.com/en/actions/deployment/targeting-different-environments/using-environments-for-deployment) with a specific service.\n\n```yaml\nname: Deploy Preevy environment\non:\n  pull_request:\n    types:\n      - opened\n      - reopened\n      - synchronize\npermissions:\n  id-token: write\n  contents: read\n\n  # Needed to write a PR comment with the environment URLs\n  pull-requests: write\njobs:\n  deploy:\n    timeout-minutes: 15\n\n    # allow a single job to run per PR\n    concurrency: preevy-${{ github.event.number }}\n\n    environment:\n      # An environment needs to be created at https://github.com/YOUR-ORG/YOUR-REPO/settings/environments\n      name: preview\n      # Change `frontend` and `3000` to the service and port whos URL should be used for the deployment\n      url: ${{ fromJson(steps.preevy.outputs.urls-map).frontend[3000] }}\n\n    runs-on: ubuntu-latest\n    steps:\n      - uses: aws-actions/configure-aws-credentials@v2\n        with:\n          role-to-assume: arn:aws:iam::12345678:role/my-role\n          aws-region: eu-west-1\n\n      - uses: actions/checkout@v3\n\n      - uses: livecycle/preevy-up-action@v2.3.0\n        id: preevy\n        with:\n          # Create the profile using the `preevy init` command, see https://preevy.dev/ci\n          profile-url: \"s3://preevy-12345678-my-profile?region=eu-west-1\"\n          # Only required if the Compose file(s) are not in the default locations\n          # https://docs.docker.com/compose/reference/#specifying-multiple-compose-files\n          docker-compose-yaml-paths: \"./docker/docker-compose.yaml\"\n```\n\n### Build on the CI machine with cache, deploy on a Google Cloud VM\n\nThe following features are shown:\n\n* [Configuring Google Cloud credentials](https://github.com/google-github-actions/auth) using a Service Account JSON file\n* [Offloading the build the CI machine](https://preevy.dev/recipes/faster-build#part-1-offload-the-build) by creating a BuildKit builder and specifying its name to the Preevy up action\n* Using GitHub Packages (GitHub Container Registry, GHCR) as a [cache](https://preevy.dev/recipes/faster-build#part-2-automatically-configure-cache) to make the build faster across different PRs.\n\n```yaml\nname: Deploy Preevy environment\non:\n  pull_request:\n    types:\n      - opened\n      - reopened\n      - synchronize\npermissions:\n  id-token: write\n  contents: read\n\n  # Needed to use GHCR\n  packages: write\n\n  # Needed to write a PR comment with the environment URLs\n  pull-requests: write\njobs:\n  deploy:\n    timeout-minutes: 15\n    concurrency: preevy-${{ github.event.number }}\n\n    environment:\n      # An environment needs to be created at https://github.com/YOUR-ORG/YOUR-REPO/settings/environments\n      name: preview\n      # Change `frontend` and `3000` to the service and port whos URL should be used for the deployment\n      url: ${{ fromJson(steps.preevy.outputs.urls-map).frontend[3000] }}\n\n    env:\n      GITHUB_TOKEN: ${{ github.token }}\n\n    runs-on: ubuntu-latest\n    steps:\n      - uses: actions/checkout@v3\n\n      - name: 'Authenticate to Google Cloud'\n        id: auth\n        uses: 'google-github-actions/auth@v1'\n        with:\n          token_format: access_token\n\n          # Create a key according to https://github.com/google-github-actions/auth#service-account-key-json\n          credentials_json: '${{ secrets.PREEVY_SA_KEY }}'\n\n      - name: Set up Docker Buildx\n        id: buildx_setup\n        uses: docker/setup-buildx-action@v3\n\n      -\n        name: Login to GitHub Container Registry\n        uses: docker/login-action@v3\n        with:\n          registry: ghcr.io\n          username: ${{ github.actor }}\n          password: ${{ secrets.GITHUB_TOKEN }}\n\n      - uses: livecycle/preevy-up-action@v2.3.0\n        id: preevy_up\n        with:\n          # Create the profile using the `preevy init` command, see https://preevy.dev/ci\n          profile-url: \"s3://preevy-12345678-my-profile?region=eu-west-1\"\n          # Specify the GHCR registry and the builder created above\n          args: --registry ghcr.io/livecycle --builder ${{ steps.buildx_setup.outputs.name }}\n          # Only required if the Compose file(s) are not in the default locations\n          # https://docs.docker.com/compose/reference/#specifying-multiple-compose-files\n          docker-compose-yaml-paths: \"./docker/docker-compose.yaml\"\n\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flivecycle%2Fpreevy-up-action","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flivecycle%2Fpreevy-up-action","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flivecycle%2Fpreevy-up-action/lists"}