How to integrate PageShare in CI?

Krystian Kruk

PageShare CLI requires additional system dependencies to run Chromium browser.

That's why, the easiest way to use PageShare in your CI jobs is by docker.

Use our docker container pageshare/cli from docker hub (source Dockerfile).

docker run --rm -v "$(pwd)/dist:/usr/share/pageshare/dist" pageshare/cli /usr/share/pageshare/dist --access-token ...

Make sure that $(pwd)/dist points to a folder when your built frontend project can be found (this folder needs to include index.html file).

Copy your private access token from the PageShare settings page and use it as the --access-token parameter value. Keep it as a secret. It guarantees that no one else will get access to your PageShare account.

Besides --access-token, you can provide all other parameters that are supported by our NPM package. If you want to integrate with GitHub, remember to provide --git-remote-url and --git-commit.