Skip to content

Commit

Permalink
Merge pull request GatherPress#847 from carstingaxion/fix/screenshot-…
Browse files Browse the repository at this point in the history
…workflow-plugin-i18n

Use latest stable plugin version (not dev) to generate screenshots from
  • Loading branch information
carstingaxion authored Sep 3, 2024
2 parents a98a618 + a600060 commit 9ee889e
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 9 deletions.
11 changes: 8 additions & 3 deletions .github/scripts/wordpress-org-screenshots/blueprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,14 @@
"userId": 1
},
{
"step": "activatePlugin",
"pluginName": "gatherpress",
"pluginPath": "/wordpress/wp-content/plugins/gatherpress"
"step": "installPlugin",
"pluginZipFile": {
"resource": "wordpress.org/plugins",
"slug": "gatherpress"
},
"options": {
"activate": true
}
},
{
"step": "importWxr",
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/wordpress-org-screenshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,6 @@ jobs:
{
"step": "setSiteLanguage",
"language": "${{ matrix.locale }}"
},
{
"step": "wp-cli",
"command": "wp option update WPLANG ${{ matrix.locale }}"
}
]'
echo "Use jq to append the site language step to the existing blueprint JSON file."
Expand Down
4 changes: 3 additions & 1 deletion docs/contributor/screenshot-generator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,14 @@ With the help of WordPress Playground, identical instances are created one for e
While such a workflow could run on every major- and minor-, but not on bug-fix-releases, this is *currently **started manually** via `workflow_dispatch`*.

1. Start the workflow
![The workflow trigger button, to start the screenshot generator workflows.](./screenshot-generator__workflow-dispatch.png)
1. Just triggering this workflow will start the **default routine**, which checks for differences to prior versions of images and only updates the screenshots with noticaeable changes. Screenshots that did not exist before, will be created automatically.
2. Or running the workflow with the "**Update all Screenshots?**" enabled, will skip the comparison and recreate all Screenshots.
2. After the workflow has successfully ran ...
![The screenshot generator workflows running on github.com](./screenshot-generator__workflow-runs.png)
3. ... **pull_requests are created**, one for each language, that could be reviewed by native speakers.
![The screenshot generator workflows running on github.com](./screenshot-generator__PRs-per-language.png)
![The created PRs per language on github.com](./screenshot-generator__PRs-per-language.png)

## Manually generating Screenshots

The workflow scripts can also be used to **manually create screenshots**. In general, only a Playground instance is needed. This could have different languages enabled or additional plugins added, that may extend GatherPress or demonstrate a new feature.
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
"pretest:unit:php": "wp-env start --xdebug",
"test:unit:php": "wp-env run tests-wordpress php -dxdebug.mode=coverage /var/www/html/wp-content/plugins/gatherpress/vendor/bin/phpunit -c /var/www/html/wp-content/plugins/gatherpress/phpunit.xml.dist --coverage-clover=coverage.xml --coverage-html=build/coverage-report",
"wp-env": "wp-env",
"playground": "./node_modules/@wp-playground/cli/wp-playground.js server --mount=./:/wordpress/wp-content/plugins/gatherpress"
"playground": "./node_modules/@wp-playground/cli/wp-playground.js server",
"playground:mount": "./node_modules/@wp-playground/cli/wp-playground.js server --mount=./:/wordpress/wp-content/plugins/gatherpress"
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 9ee889e

Please sign in to comment.