mirror of
https://github.com/rendercv/rendercv.git
synced 2025-12-24 05:58:06 -05:00
workflows: automate schema.json, examples folder, and entry figures generation
This commit is contained in:
57
.github/workflows/deploy-docs.yaml
vendored
57
.github/workflows/deploy-docs.yaml
vendored
@@ -7,11 +7,14 @@ on:
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v4
|
||||
@@ -35,3 +38,57 @@ jobs:
|
||||
- name: Deploy documentation
|
||||
run: |
|
||||
hatch run docs:deploy
|
||||
|
||||
- name: Update schema.json
|
||||
run: |
|
||||
hatch run docs:update-schema
|
||||
|
||||
- name: Update `examples` folder
|
||||
run: |
|
||||
hatch run docs:update-examples
|
||||
|
||||
- name: Update entry figures
|
||||
run: |
|
||||
hatch run docs:update-entry-figures
|
||||
|
||||
- name: Check if there are changes
|
||||
uses: dorny/paths-filter@v3
|
||||
id: changes
|
||||
with:
|
||||
filters: |
|
||||
schema:
|
||||
- schema.json
|
||||
examples:
|
||||
- examples/*.yaml
|
||||
entry-figures:
|
||||
- docs/assets/**/*.png
|
||||
|
||||
- name: Update schema.json
|
||||
if: steps.changes.outputs.schema == 'true'
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add schema.json
|
||||
git commit -m "docs: update schema.json"
|
||||
|
||||
- name: Update `examples` folder
|
||||
if: steps.changes.outputs.examples == 'true'
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add examples/*
|
||||
git commit -m "docs: update examples"
|
||||
|
||||
- name: Update entry figures
|
||||
if: steps.changes.outputs.entry-figures == 'true'
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||
git add docs/assets/**/*.png
|
||||
git commit -m "docs: update entry figures"
|
||||
|
||||
- name: Push changes
|
||||
if: steps.changes.outputs.schema == 'true' || steps.changes.outputs.examples == 'true' || steps.changes.outputs.entry-figures == 'true'
|
||||
run: |
|
||||
git push
|
||||
|
||||
Reference in New Issue
Block a user