Skip to content

11.17.0

11.17.0 #234

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@main
with:
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- name: Set up Python 3.
uses: actions/setup-python@v3
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 Poetry.
uses: snok/install-poetry@v1.3
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: 16
- name: Install Python dependencies.
run: poetry install -E docs
- 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
poetry 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@v3
with:
path: dist
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4