Skip to content

Commit 6ef7144

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 6ef7144

File tree

2 files changed

+35
-39
lines changed

2 files changed

+35
-39
lines changed

.github/workflows/docspublish.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,48 @@ 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+
17+
- name: Set up Python
18+
uses: actions/setup-python@v5
19+
with:
20+
python-version: "3.x"
21+
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install -U pip poetry
25+
poetry --version
26+
poetry install
27+
28+
- name: Update CLI screenshots
29+
run: |
30+
poetry run python scripts/gen_cli_help_screenshots.py
31+
32+
- name: Commit and push updated CLI screenshots
33+
run: |
34+
git config --global user.name "github-actions[bot]"
35+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
36+
git add docs/images/cli_help
37+
git commit -m "docs(cli/screenshots) update CLI screenshots" -m "[skip ci]"
38+
git push
39+
940
publish-documentation:
1041
runs-on: ubuntu-latest
42+
needs: update-cli-screenshots
1143
steps:
1244
- uses: actions/checkout@v4
1345
with:
1446
token: "${{ secrets.PERSONAL_ACCESS_TOKEN }}"
1547
fetch-depth: 0
48+
- name: Pull latest changes
49+
run: |
50+
git pull origin master
1651
- name: Set up Python
1752
uses: actions/setup-python@v5
1853
with:

.github/workflows/generate_cli_screenshots.yml

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

0 commit comments

Comments
 (0)