-
-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ci/cd): automates the generation of CLI screenshots
- Loading branch information
1 parent
f1ece99
commit ce2128f
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
name: Generate CLI screenshots | ||
|
||
on: | ||
pull_request: | ||
types: | ||
- closed | ||
|
||
jobs: | ||
generate_cli_screenshots: | ||
if: github.event.pull_request.merged == true | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}" | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.x" | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip poetry | ||
poetry --version | ||
poetry install | ||
- name: Generate CLI screenshots | ||
run: | | ||
poetry run python scripts/gen_cli_help_screenshots.py | ||
- name: Commit and push CLI screenshots | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "github-actions[bot]@users.noreply.github.com" | ||
git add docs/images/cli_help | ||
git commit -m "docs(cli/screenshots) update CLI screenshots" | ||
git push |