Skip to content

Commit 9865f73

Browse files
committed
ci(workflow): move 'generate_cli_screenshots' steps to 'docspublish'
Since the purpose is to updated the CLI screenshots on Github Pages, combining this two workflows makes sense.
1 parent c2bbc92 commit 9865f73

File tree

2 files changed

+31
-39
lines changed

2 files changed

+31
-39
lines changed

.github/workflows/docspublish.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,44 @@ on:
66
- master
77

88
jobs:
9+
update-cli-screenshots:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v4
13+
with:
14+
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
15+
fetch-depth: 0
16+
- name: Set up Python
17+
uses: actions/setup-python@v5
18+
with:
19+
python-version: "3.x"
20+
- name: Install dependencies
21+
run: |
22+
python -m pip install -U pip poetry
23+
poetry --version
24+
poetry install
25+
- name: Update CLI screenshots
26+
run: |
27+
poetry run python scripts/gen_cli_help_screenshots.py
28+
- name: Commit and push updated CLI screenshots
29+
run: |
30+
git config --global user.name "github-actions[bot]"
31+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
32+
git add docs/images/cli_help
33+
git commit -m "docs(cli/screenshots) update CLI screenshots" -m "[skip ci]"
34+
git push
35+
936
publish-documentation:
1037
runs-on: ubuntu-latest
38+
needs: update-cli-screenshots
1139
steps:
1240
- uses: actions/checkout@v4
1341
with:
1442
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
1543
fetch-depth: 0
44+
- name: Pull latest changes
45+
run: |
46+
git pull origin master
1647
- name: Set up Python
1748
uses: actions/setup-python@v5
1849
with:

.github/workflows/generate_cli_screenshots.yml

Lines changed: 0 additions & 39 deletions
This file was deleted.

0 commit comments

Comments
 (0)