Closed rclement closed 1 year ago
The shot-scraper
route works great but the demo dashboard is not deterministic because of the word cloud chart!
Also, two triggering options:
GITHUB_TOKEN
to not retrigger a workflow afterwardsTo use the GITHUB_TOKEN
, the better way is to define the permissions
setting in workflow
The main branch is protected and commiting from GHA results in the following error:
remote: error: GH006: Protected branch update failed for refs/heads/master.
remote: error: Changes must be made through a pull request. 5 of 5 required status checks are expected.
When using a GitHub personal access token instead of the default GITHUB_TOKEN
, pushing to a protected branch works but results in an infinite loop.
As there is no way to enable branch protection and have a GitHub Action use the GITHUB_TOKEN
to push to a protected branch (only way to avoid infinite loop), let's download manually the take-shots
image artifact and manually update the screenshot in the repo.
The features are implemented in this plugin and incorporated into the demo deployment, the more the README screenshot is out-of-date!
In order to automate the process of keeping the screenshot up-to-date, one solution would be to use
shot-scraper
:As this tool is using a browser automation, we might be able to point it to the demo dashboard and wait for a certain amount of time (or condition) to take the shot, so that all JS code has been executed and rendered.