Skip to content

Merge pull request #94 from eliteportal/DPE-1462-add-module-value #49

Merge pull request #94 from eliteportal/DPE-1462-add-module-value

Merge pull request #94 from eliteportal/DPE-1462-add-module-value #49

# Workflow that updates the metadata dictionary materials in docs/ and _data/ after changes to the data model
# This action should automatically run after: a PR with changes to the data model is merged into main (update_data_model.yml)
# This action should run before: the Github Pages deployment workflow is run to publish changes to the dictionary site (pages.yml)
name: Update Metadata Dictionary
on:
push:
branches:
- main
workflow_dispatch:
jobs:
dictionary:
runs-on: ubuntu-latest
name: update term files and pages
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.COMMIT_BOT_ID }}
private-key: ${{ secrets.COMMIT_BOT_KEY }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Install Poetry
uses: snok/install-poetry@v1
- name: Install dependencies
run: |
poetry install
- name: update _data csv term files
run: |
poetry run python processes/data_manager.py
- name: update term pages
run: |
poetry run python processes/page_manager.py
- name: Commit changes
uses: EndBug/add-and-commit@v9
with:
message: 'Github Action: Updated dictionary term files and term pages'
default_author: github_actions