Skip to content

Selflify/preview-prepare-action

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 

Selflify Preview Prepare Action

Prepare a preview deployment matrix from .github/preview-sites.json, compute the preview path name, and resolve the related pull request number.

What it does

  • validates the preview site config file
  • exposes the deploy matrix for later jobs
  • computes a stable preview path such as pr-42, stable, or a normalized branch/tag name
  • resolves the pull request number for comment publishing

Usage

- id: preview
  uses: Selflify/preview-prepare-action@v1
  with:
    config-path: .github/preview-sites.json
    github-token: ${{ secrets.GITHUB_TOKEN }}

Outputs

  • path_name
  • pr_number
  • matrix
  • site_names

Expected config format

{
  "include": [
    {
      "site": "marketing",
      "node_version": "20",
      "setup_cmd": "",
      "install_cmd": "yarn install --immutable",
      "build_cmd": "yarn build",
      "output": "dist"
    }
  ]
}

About

Prepare a preview deploy matrix from preview-sites.json for Selflify workflows.

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Packages

 
 
 

Contributors