mirror of
https://github.com/rendercv/rendercv.git
synced 2025-12-23 21:47:55 -05:00
workflows: create update-files.yaml workflow
This commit is contained in:
54
.github/workflows/publish.yaml
vendored
54
.github/workflows/publish.yaml
vendored
@@ -24,14 +24,14 @@ jobs:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
|
||||
- name: Set up Python 3.12
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Install Hatch
|
||||
uses: pypa/hatch@install
|
||||
uses: pypa/hatch@install
|
||||
|
||||
- name: Check if the release tag matches the version
|
||||
uses: samuelcolvin/check-python-version@v4.1
|
||||
@@ -45,50 +45,6 @@ jobs:
|
||||
- name: Upload package to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
|
||||
update_files:
|
||||
name: Update schema.json, examples, and entry figures
|
||||
runs-on: ubuntu-latest
|
||||
needs: [publish]
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Python 3.12
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Install Hatch
|
||||
uses: pypa/hatch@install
|
||||
|
||||
- name: Set Git credentials
|
||||
run: |
|
||||
git config --global user.name "${{ github.actor }}"
|
||||
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
|
||||
|
||||
- name: Update schema.json
|
||||
run: |
|
||||
hatch run docs:update-schema
|
||||
git add schema.json
|
||||
git commit -m "docs: update schema.json"
|
||||
|
||||
- name: Update `examples` folder
|
||||
run: |
|
||||
hatch run docs:update-examples
|
||||
git add examples/*
|
||||
git commit -m "docs: update examples"
|
||||
|
||||
- name: Update entry figures
|
||||
run: |
|
||||
hatch run docs:update-entry-figures
|
||||
git add docs/assets/**/*.png
|
||||
git commit -m "docs: update entry figures"
|
||||
|
||||
- name: Push changes
|
||||
run: |
|
||||
git push origin HEAD:main
|
||||
call_update_files_workflow:
|
||||
name: Update files
|
||||
uses: ./.github/workflows/update-files.yaml
|
||||
|
||||
5
.github/workflows/test.yaml
vendored
5
.github/workflows/test.yaml
vendored
@@ -7,6 +7,7 @@ on:
|
||||
pull_request:
|
||||
branches: ["main", "dev"]
|
||||
workflow_call: # to make the workflow triggerable from other workflows (publish.yaml)
|
||||
workflow_dispatch: # to make the workflow triggerable manually
|
||||
|
||||
# The workflow:
|
||||
jobs:
|
||||
@@ -51,7 +52,7 @@ jobs:
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
|
||||
- name: Install Hatch
|
||||
uses: pypa/hatch@install
|
||||
|
||||
@@ -84,7 +85,7 @@ jobs:
|
||||
- name: Download coverage files
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: coverage-* # download all the uploaded coverage reports
|
||||
pattern: coverage-* # download all the uploaded coverage reports
|
||||
path: coverage
|
||||
merge-multiple: true # download them in the same folder
|
||||
|
||||
|
||||
54
.github/workflows/update-files.yaml
vendored
Normal file
54
.github/workflows/update-files.yaml
vendored
Normal file
@@ -0,0 +1,54 @@
|
||||
name: Update files
|
||||
|
||||
# GitHub events that triggers the workflow:
|
||||
on:
|
||||
workflow_call: # to make the workflow triggerable from other workflows (publish.yaml)
|
||||
workflow_dispatch: # to make the workflow triggerable manually
|
||||
|
||||
jobs:
|
||||
update_files:
|
||||
name: Update schema.json, examples, and entry figures
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
submodules: recursive
|
||||
|
||||
- name: Set up Python 3.12
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
|
||||
- name: Install Hatch
|
||||
uses: pypa/hatch@install
|
||||
|
||||
- name: Set Git credentials
|
||||
run: |
|
||||
git config --global user.name "${{ github.actor }}"
|
||||
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
|
||||
|
||||
- name: Update schema.json
|
||||
run: |
|
||||
hatch run docs:update-schema
|
||||
git add schema.json
|
||||
git commit -m "docs: update schema.json"
|
||||
|
||||
- name: Update `examples` folder
|
||||
run: |
|
||||
hatch run docs:update-examples
|
||||
git add examples/*
|
||||
git commit -m "docs: update examples"
|
||||
|
||||
- name: Update entry figures
|
||||
run: |
|
||||
hatch run docs:update-entry-figures
|
||||
git add docs/assets/**/*.png
|
||||
git commit -m "docs: update entry figures"
|
||||
|
||||
- name: Push changes
|
||||
run: |
|
||||
git push origin HEAD:main
|
||||
Reference in New Issue
Block a user