Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/leko/reg-publish-github-pages-plugin
A reg-suit plugin to publish reports on GitHub pages
https://github.com/leko/reg-publish-github-pages-plugin
automation-tests nodejs reg-suit regression-testing visual-tests
Last synced: 2 months ago
JSON representation
A reg-suit plugin to publish reports on GitHub pages
- Host: GitHub
- URL: https://github.com/leko/reg-publish-github-pages-plugin
- Owner: Leko
- License: mit
- Created: 2021-01-22T02:26:01.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2023-01-23T09:08:59.000Z (almost 2 years ago)
- Last Synced: 2024-10-24T06:03:30.220Z (2 months ago)
- Topics: automation-tests, nodejs, reg-suit, regression-testing, visual-tests
- Language: TypeScript
- Homepage:
- Size: 1.67 MB
- Stars: 7
- Watchers: 3
- Forks: 1
- Open Issues: 25
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# reg-publish-github-pages-plugin
![version](https://img.shields.io/npm/v/reg-publish-github-pages-plugin)
![LICENSE](https://img.shields.io/npm/l/reg-publish-github-pages-plugin)A reg-suit plugin to fetch and publish assets to the GitHub pages.
## How it works
![overview](./docs/overview.png)
The plugin will create [orphan branch](https://git-scm.com/docs/git-checkout#Documentation/git-checkout.txt---orphanltnewbranchgt) when you run `reg-suit prepare -p publish-github-pages`. Then the plugin will commit report pages and images to the branch whenever you run `reg-suit run`. The branch has completely different tree from your branches. It doesn't affect any existing branches. So you can use it in the same repository you want to introduce reg-suit.
## Install
```sh
npm i -D reg-publish-github-pages-plugin
reg-suit prepare -p publish-github-pages
```## Setup
You need to configure GitHub pages before using this plugin.
[See the official documentation](https://docs.github.com/en/github/working-with-github-pages)## Configure
```ts
{
repository: string;
branchName: string;
token: string;
customDomain?: string;
pathPrefix?: string;
}
```- `repository` - _Required_ - A repository name in the form of `owner/name` such as `Leko/reg-publish-github-pages-plugin`.
- `branchName` - _Required_ - A branch name for the GitHub pages.
- `token` - _Required_ - A GitHub token. The token must have `user:email` and `public_repo` permission. When the repository is private, the token requires `repo` permission instead of `public_repo`.
- `customDomain` - _Optional_ - A custom domain when you set it to the GitHub pages.
- `pathPrefix` - _Optional_ - Specify paths. For example, when you set `some_dir` as this property, this plugin will publish with URL such as `https://{TODO}/some_dir/index.html`.## See also
- [Embed environment values](https://github.com/reg-viz/reg-suit#embed-environment-values)
## LICENSE
This repository is under [MIT](./LICENSE) license.