49 lines
1.9 KiB
YAML
49 lines
1.9 KiB
YAML
name: capture-procurement-marketing-assets
|
|
|
|
on:
|
|
push:
|
|
branches: [docs/executable-skill-showcase-271]
|
|
paths:
|
|
- "scripts/capture-procurement-showcase.py"
|
|
- ".github/workflows/capture-procurement-marketing.yml"
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
jobs:
|
|
capture:
|
|
if: github.ref_name == 'docs/executable-skill-showcase-271'
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
persist-credentials: true
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: "3.11"
|
|
- name: Prepare Chrome, Chinese fonts and Python imaging
|
|
run: |
|
|
python -m pip install --quiet pillow selenium
|
|
sudo apt-get update -qq
|
|
sudo apt-get install -y -qq fonts-noto-cjk
|
|
google-chrome --version
|
|
- name: Download Marqdo v2.7.1 Linux release
|
|
run: |
|
|
mkdir -p /tmp/marqdo-marketing-cli
|
|
curl -fL --retry 3 "https://github.com/cflmy/marqdo/releases/download/v2.7.1/marqdo-2.7.1-x86_64-unknown-linux-gnu.zip" -o /tmp/marqdo-marketing.zip
|
|
unzip -q /tmp/marqdo-marketing.zip -d /tmp/marqdo-marketing-cli
|
|
BIN="$(find /tmp/marqdo-marketing-cli -type f -name marqdo | head -n 1)"
|
|
test -n "$BIN"
|
|
chmod +x "$BIN"
|
|
echo "CLI_BIN=$BIN" >> "$GITHUB_ENV"
|
|
- name: Record real command outputs and capture real View
|
|
run: python scripts/capture-procurement-showcase.py --cli "$CLI_BIN"
|
|
- name: Commit reproducible promotional assets
|
|
run: |
|
|
git config user.name "github-actions[bot]"
|
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
git add assets/marketing/procurement-cli.gif assets/marketing/procurement-view.png
|
|
git diff --cached --quiet || git commit -m "docs: capture live procurement CLI GIF and View screenshot"
|
|
git push origin HEAD:docs/executable-skill-showcase-271
|