From d03114fd33dd0116b8b337cbc7b1f43b0b19d4bc Mon Sep 17 00:00:00 2001 From: Jonah Aragon Date: Fri, 14 Apr 2023 15:58:01 -0500 Subject: [PATCH] Netlify production releases --- .github/workflows/release.yml | 4 ++++ README.md | 2 ++ theme/main.html | 6 ++++++ 3 files changed, 12 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b90e1a23..08efb36d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -40,6 +40,10 @@ jobs: ssh-key: ${{ secrets.ACTIONS_SSH_KEY }} submodules: 'true' + - name: Push to production branch + run: | + git push origin main:production + - name: Pages setup uses: actions/configure-pages@v3 diff --git a/README.md b/README.md index 11746084..efd0248d 100644 --- a/README.md +++ b/README.md @@ -111,6 +111,8 @@ Translations downloaded from Crowdin are [.gitignore](/.gitignore)'d, so any loc ## Releasing +It is required to create a GitHub release to publish the current site to privacyguides.org. The current `main` branch can be previewed at [https://main.staging.privacyguides.dev](https://main.staging.privacyguides.dev) prior to release. + 1. Create a new tag: `git tag -s v3.X.X -m 'Some message'` - [View existing tags](https://github.com/privacyguides/privacyguides.org/tags) - Tag [numbering](https://semver.org/): Increment the MINOR (2nd) number when making significant changes (adding/deleting pages, etc.), increment the PATCH (3rd) number when making minor changes (typos, bug fixes). Probably leave the MAJOR number at 3 until a massive revamp (v1 -> v2 was the Jekyll to MkDocs transition, v2 -> v3 was the introduction of translations). diff --git a/theme/main.html b/theme/main.html index e639468e..b74432ad 100644 --- a/theme/main.html +++ b/theme/main.html @@ -77,6 +77,12 @@ Visit privacyguides.org for current advice. +{% elif config.extra.context == "branch-deploy" %} + You're viewing a staging branch of Privacy Guides built on {{ build_date_utc }}. + The information on this page may be incomplete or otherwise not yet meet our editorial release standards. + + Visit privacyguides.org for current advice. + {% else %}{% endif %}{% endblock %} {% block extrahead %}{% if page and page.meta and page.meta.schema %}