Skip to content

Commit

Permalink
Merge pull request #1236 from nextstrain/docs/v3
Browse files Browse the repository at this point in the history
  • Loading branch information
ivan-aksamentov authored Oct 31, 2023
2 parents f603fc1 + b0cf80b commit f0defde
Show file tree
Hide file tree
Showing 52 changed files with 4,608 additions and 3,814 deletions.
31 changes: 29 additions & 2 deletions .github/workflows/cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -299,9 +299,36 @@ jobs:
./tests/test-linux-distros ./.out/nextclade-x86_64-unknown-linux-gnu
check-cli-docs:
name: "Check that autogenerated CLI documentation is up-to-date"
needs: [ build-cli ]
runs-on: ubuntu-22.04

steps:
- name: "Checkout code"
uses: actions/checkout@v3
with:
fetch-depth: 1
submodules: true

- name: "Download build artifacts"
uses: actions/download-artifact@v3
with:
name: "out"
path: ".out"

- name: "Re-generate CLI docs"
run: |
chmod +x ./.out/nextclade-x86_64-unknown-linux-gnu
./scripts/update_cli_reference_docs ./.out/nextclade-x86_64-unknown-linux-gnu
- name: "Check that the git diff is clean"
run: |
git -c color.ui=always diff --exit-code 'docs/user/nextclade-cli/reference.md' || (echo "Autogenerated CLI documentation is not up-to-date, please run './scripts/update_cli_reference_docs <path_to_nextclade>', then verify and commit the changes." >&2; exit 1)
publish-to-github-releases:
name: "Publish to GitHub Releases"
needs: [ build-cli, run-unit-tests, run-lints, run-smoke-tests, run-linux-distros-test ]
needs: [ build-cli, run-unit-tests, run-lints, run-smoke-tests, run-linux-distros-test, check-cli-docs ]
if: endsWith(github.ref, '/release-cli')
runs-on: ubuntu-22.04

Expand Down Expand Up @@ -337,7 +364,7 @@ jobs:
publish-to-docker-hub:
name: "Publish to Docker Hub"
needs: [ build-cli, run-unit-tests, run-lints, run-smoke-tests, run-linux-distros-test ]
needs: [ build-cli, run-unit-tests, run-lints, run-smoke-tests, run-linux-distros-test, check-cli-docs ]
if: endsWith(github.ref, '/release-cli')
runs-on: ubuntu-22.04

Expand Down
2,735 changes: 133 additions & 2,602 deletions CHANGELOG.md

Large diffs are not rendered by default.

10 changes: 10 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ docker-docs:
--name=nextclade-docs-builder-$(shell date +%s) \
--init \
--user=$(shell id -u):$(shell id -g) \
--volume=$(shell pwd):/home/user/src \
--volume=$(shell pwd):/workdir \
--publish=8000:8000 \
--workdir=/home/user/src \
--env 'TERM=xterm-256colors' \
nextclade-docs-builder


Expand Down
43 changes: 24 additions & 19 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
FROM continuumio/miniconda3:4.9.2
FROM continuumio/miniconda3

SHELL ["bash", "--login", "-euxo", "pipefail", "-c"]

ARG DEBIAN_FRONTEND=noninteractive
ARG USER=user
Expand All @@ -9,8 +11,20 @@ ARG GID
ENV TERM="xterm-256color"
ENV HOME="/home/user"


RUN set -euxo pipefail >/dev/null \
&& export DEBIAN_FRONTEND=noninteractive \
&& apt-get update -qq --yes \
&& apt-get install -qq --no-install-recommends --yes \
make \
sudo \
>/dev/null \
&& apt-get clean autoclean >/dev/null \
&& apt-get autoremove --yes >/dev/null \
&& rm -rf /var/lib/apt/lists/*

# Make a user and group
RUN set -x >/dev/null \
RUN set -euxo pipefail >/dev/null \
&& \
if [ -z "$(getent group ${GID})" ]; then \
addgroup --system --gid ${GID} ${GROUP}; \
Expand All @@ -34,27 +48,18 @@ RUN set -x >/dev/null \
&& echo "%sudo ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
&& echo "${USER} ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers \
&& touch ${HOME}/.hushlogin \
&& chown -R ${UID}:${GID} "${HOME}"

RUN set -x \
&& chown -R ${USER}:${GROUP} ${HOME}
&& chown -R ${UID}:${GID} "${HOME}" \
&& chown -R ${USER}:${GROUP} ${HOME}

COPY environment.yml ${HOME}/src/
WORKDIR /workdir

WORKDIR ${HOME}/src
COPY environment.yml /workdir

RUN set -x \
&& conda env create docs.clades.nextstrain.org
RUN set -euxo pipefail >/dev/null \
&& conda env create -n "docs.clades.nextstrain.org"

USER ${USER}

RUN set -x \
&& conda init bash \
&& echo "conda activate docs.clades.nextstrain.org" >> ${HOME}/.bashrc
ENTRYPOINT ["conda", "run", "--no-capture-output", "-n", "docs.clades.nextstrain.org", "bash", "-euo", "pipefail", "-c"]

CMD bash -c "set -x \
&& source ${HOME}/.bashrc \
&& cd ${HOME}/src/docs \
&& rm -rf build \
&& make autobuild \
"
CMD ["cd docs && make autobuild"]
4 changes: 4 additions & 0 deletions docs/_static/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ details pre * {
white-space: pre-wrap;
word-wrap: break-word;
}

.rst-content code {
font-size: 0.8em !important;
}
2,449 changes: 2,449 additions & 0 deletions docs/changes/CHANGELOG.old.md

Large diffs are not rendered by default.

Loading

1 comment on commit f0defde

@vercel
Copy link

@vercel vercel bot commented on f0defde Oct 31, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

nextclade – ./

nextclade.vercel.app
nextclade-git-master-nextstrain.vercel.app
nextclade-nextstrain.vercel.app

Please sign in to comment.