Skip to content

Commit

Permalink
Add workflow for updateing api.json files
Browse files Browse the repository at this point in the history
[noissue]
  • Loading branch information
pedro-psb committed Jul 22, 2024
1 parent 24a8ea2 commit 122050b
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/update-data.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "Update Data Branch"

on:
workflow_dispatch:
schedule:
- cron: "0 0 * * 0,3" # every sunday and wednesday at midnight

jobs:
update-data:
runs-on: "ubuntu-latest"
steps:
- name: "Checkout docs-data branch"
uses: "actions/checkout@v4"
with:
ref: docs-data

- name: "Set up Python"
uses: "actions/setup-python@v5"
with:
python-version: "3.11"

- name: "List requirements"
run: |
cat requirements_ubuntu.txt
cat requirements_python.txt
- name: "Install System dependencies"
run: |
sudo apt -y install $(tr '\n' ' ' < requirements_ubuntu.txt)
- name: "Install Python dependencies"
run: |
pip install --upgrade pip
pip install -r requirements_python.txt
- name: "Generate, commit and push updated openapi json files to 'docs-data' branch"
run: |
git config user.name github-actions
git config user.email [email protected]
./update-data.sh

0 comments on commit 122050b

Please sign in to comment.