minimal aggregation of value sets #11
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Preview documentation build | |
on: | |
pull_request: | |
types: | |
- opened | |
- reopened | |
- synchronize | |
concurrency: preview-${{ github.ref }} | |
jobs: | |
preview-docs: | |
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: | |
python-version: 3.9 | |
- name: Install Poetry. | |
uses: snok/[email protected] | |
- name: Install yq | |
env: | |
YQ_VERSION: v4.30.5 | |
YQ_BINARY: yq_linux_amd64 | |
run: | | |
mkdir -p $HOME/.local/bin | |
wget https://github.com/mikefarah/yq/releases/download/$YQ_VERSION/$YQ_BINARY.tar.gz -O - | tar xz && mv $YQ_BINARY $HOME/.local/bin/yq | |
echo "$HOME/.local/bin" >> $GITHUB_PATH | |
- name: Install Python dependencies. | |
run: poetry install -E docs | |
- name: Regenerate schema | |
run: | | |
make \ | |
clean \ | |
schema-clean \ | |
src/nmdc_submission_schema/schema/nmdc_submission_schema.yaml \ | |
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: Upload artifact | |
uses: actions/upload-pages-artifact@v1 | |
with: | |
path: dist | |
- name: Deploy preview | |
uses: rossjrw/pr-preview-action@v1 | |
with: | |
source-dir: dist/ | |
preview-branch: gh-pages |