Skip to content

Merge pull request #456 from microbiomedata/microbial-estimated-size-cap #248

Merge pull request #456 from microbiomedata/microbial-estimated-size-cap

Merge pull request #456 from microbiomedata/microbial-estimated-size-cap #248

Workflow file for this run

name: Auto-deployment of nmdc_submission_schema documentation and DH interface
on:
push:
branches: [ main ]
jobs:
build-docs:
# TODO: this should probably be split into separate build and deploy jobs to
# reduce privileged token exposure
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Set up Python 3.
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
# Note: We wrap the `3.10` in quotes so the YAML parser doesn't interpret
# it as a float and convert it into `3.1`.
python-version: "3.10"
- name: Install uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- name: Install Node.js
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 16
- name: Install Python dependencies.
run: uv sync --locked
- name: Install JavaScript dependencies.
working-directory: data_harmonizer
run: npm install
- name: Regenerate schema
run: |
make \
clean \
schema-build \
project/json/nmdc_submission_schema.json
- name: Build documentation.
run: |
mkdir -p docs
touch docs/.nojekyll
make gendoc
uv run mkdocs build -d dist
- name: Build DataHarmonizer interface.
working-directory: data_harmonizer
run: |
npm run build -- --outDir ../dist/_playground --base /${{ github.event.repository.name }}/_playground/
- name: Upload artifact
uses: actions/upload-pages-artifact@fc324d3547104276b827a68afc52ff2a11cc49c9 # v5.0.0
with:
path: dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@cd2ce8fcbc39b97be8ca5fce6e763baed58fa128 # v5.0.0