Skip to content
This repository has been archived by the owner on Aug 9, 2023. It is now read-only.

Commit

Permalink
There is no stable tag in this repo
Browse files Browse the repository at this point in the history
  • Loading branch information
maeve-fpf committed Jan 5, 2022
1 parent 1b9ccdf commit 98277e7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 10 deletions.
4 changes: 1 addition & 3 deletions deploy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,8 @@ RUN deploy/build
FROM nginx:mainline-alpine@sha256:af466e4f12e3abe41fcfb59ca0573a3a5c640573b389d5287207a49d1324abd8

COPY deploy/nginx.conf /etc/nginx
RUN mkdir -p /opt/nginx/run /opt/nginx/webroot/en/latest /opt/nginx/webroot/en/stable && chown -R nginx:nginx /opt/nginx
RUN mkdir -p /opt/nginx/run /opt/nginx/webroot/en/latest && chown -R nginx:nginx /opt/nginx

USER nginx
COPY --from=sphinx --chown=nginx:nginx build/stable/html/ /opt/nginx/webroot/en/stable/
COPY --from=sphinx --chown=nginx:nginx build/stable/latex/SecureDropSupport.pdf /opt/nginx/webroot/en/stable/
COPY --from=sphinx --chown=nginx:nginx build/latest/html/ /opt/nginx/webroot/en/latest/
COPY --from=sphinx --chown=nginx:nginx build/latest/latex/SecureDropSupport.pdf /opt/nginx/webroot/en/latest/
6 changes: 2 additions & 4 deletions deploy/build
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
#!/bin/sh
#
# Run the docs build process twice, producing `build/latest` and
# `build/stable` instead of `docs/_build`.
# Run the docs build process, producing `build/latest` instead of
# `docs/_build`. Can be extended to also build `stable`.

set -e


latest_branch=main
stable_tag=$(git tag --sort=version:refname | tail -1)

do_build() {
git checkout "$1"
Expand All @@ -23,5 +22,4 @@ do_build() {
mv docs/_build "build/${2}"
}

do_build "$stable_tag" stable
do_build "$latest_branch" latest
3 changes: 0 additions & 3 deletions docs/_templates/layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
<div class="rst-other-versions">
<dl>
<dt>Versions</dt>
<dd{% if release == "stable" %} class="current-release"{% endif %}>
<a href="/en/stable/">stable</a>
</dd>
<dd{% if release == "latest" %} class="current-release"{% endif %}>
<a href="/en/latest/">latest</a>
</dd>
Expand Down

0 comments on commit 98277e7

Please sign in to comment.