Loading .gitlab-ci.yml +18 −0 Original line number Diff line number Diff line variables: SITE_URL: www.torproject.org TRANSLATION_BRANCH: "tpo-web" SITE_URL: www.torproject.org STAGING_URL: www-staging.torproject.org Loading @@ -8,3 +9,20 @@ include: file: lektor.yml - project: tpo/tpa/ci-templates file: static-shim-deploy.yml # for review apps (branches), move some press content out of the way to decrease # the build time by a factor of at least 4x -- keep only the last 1 year of # press articles partial-build: extends: .partial-build before_script: - !reference [.apt-init] - export CUTOFF=$(date -d "$(date +%Y-%m-%d) -365 day" +%Y-%m-%d) - awk '{if($1=="pub_date:" && $2 < ENVIRON["CUTOFF"])print FILENAME}' content/press/*/contents.lr | while read -d $'\n' f; do rm "$f"; done # limit regular build job to default branch, for staging/prod build: rules: - if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH' when: never - if: '$CI_COMMIT_BRANCH' templates/press.html +2 −0 Original line number Diff line number Diff line Loading @@ -49,7 +49,9 @@ <tbody> {% from "macros/pagination.html" import render_pagination %} {% from "macros/press.html" import render_snippet %} {% if this.pagination.pages > 1 %} {{ render_pagination(this.pagination) }} {% endif %} {% for item in this.pagination.items %} {{ render_snippet(item, this.alt) }} {% endfor %} Loading Loading
.gitlab-ci.yml +18 −0 Original line number Diff line number Diff line variables: SITE_URL: www.torproject.org TRANSLATION_BRANCH: "tpo-web" SITE_URL: www.torproject.org STAGING_URL: www-staging.torproject.org Loading @@ -8,3 +9,20 @@ include: file: lektor.yml - project: tpo/tpa/ci-templates file: static-shim-deploy.yml # for review apps (branches), move some press content out of the way to decrease # the build time by a factor of at least 4x -- keep only the last 1 year of # press articles partial-build: extends: .partial-build before_script: - !reference [.apt-init] - export CUTOFF=$(date -d "$(date +%Y-%m-%d) -365 day" +%Y-%m-%d) - awk '{if($1=="pub_date:" && $2 < ENVIRON["CUTOFF"])print FILENAME}' content/press/*/contents.lr | while read -d $'\n' f; do rm "$f"; done # limit regular build job to default branch, for staging/prod build: rules: - if: '$CI_COMMIT_BRANCH != $CI_DEFAULT_BRANCH' when: never - if: '$CI_COMMIT_BRANCH'
templates/press.html +2 −0 Original line number Diff line number Diff line Loading @@ -49,7 +49,9 @@ <tbody> {% from "macros/pagination.html" import render_pagination %} {% from "macros/press.html" import render_snippet %} {% if this.pagination.pages > 1 %} {{ render_pagination(this.pagination) }} {% endif %} {% for item in this.pagination.items %} {{ render_snippet(item, this.alt) }} {% endfor %} Loading