1
0
mirror of https://github.com/privacyguides/privacyguides.org.git synced 2025-07-03 10:02:44 +00:00

Compare commits

..

2 Commits

Author SHA1 Message Date
f255d49760 Create release workflow (#1693) 2022-08-24 20:24:49 -05:00
88bb0721eb Enable social cards (#1691) 2022-08-24 20:18:26 -05:00
8 changed files with 48 additions and 25 deletions

View File

@ -34,7 +34,7 @@ jobs:
- name: Python setup
uses: actions/setup-python@v4
with:
python-version: '3.7'
python-version: '3.10'
- name: Cache files
uses: actions/cache@v3.0.8
@ -50,6 +50,7 @@ jobs:
- name: Build website
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARDS: true
run: |
pipenv run mkdocs build --config-file mkdocs.production.yml
mv .well-known site/
@ -66,8 +67,6 @@ jobs:
with:
path: site
deploy:
name: Deploy
needs: build

View File

@ -29,12 +29,13 @@ jobs:
- name: Set up Python runtime
uses: actions/setup-python@v4
with:
python-version: '3.7'
python-version: '3.10'
- name: Deploy to surge.sh
uses: afc163/surge-preview@v1
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARDS: true
with:
surge_token: ${{ secrets.SURGE_TOKEN }}
github_token: ${{ secrets.GITHUB_TOKEN }}

20
.github/workflows/release.yml vendored Normal file
View File

@ -0,0 +1,20 @@
name: 📦 Releases
on:
push:
tags:
- '*'
jobs:
release:
name: Create Release
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- uses: ncipollo/release-action@v1
with:
draft: true
generateReleaseNotes: true
token: ${{ secrets.REPO_TOKEN }}

View File

@ -17,4 +17,4 @@ mkdocs-git-committers-plugin-2 = "*"
scour = "*"
[requires]
python_version = "3.7"
python_version = "3.10"

18
Pipfile.lock generated
View File

@ -1,11 +1,11 @@
{
"_meta": {
"hash": {
"sha256": "ce2630991a262d8ca83cfc13f70347f8fdd9f9d07c281ea753f5fc52f3aebbd6"
"sha256": "d3a92aec93d430ec2770963ae2dc2f72ad9f0dd042170dc90ab7a0c07b6dcda6"
},
"pipfile-spec": 6,
"requires": {
"python_version": "3.7"
"python_version": "3.10"
},
"sources": [
{
@ -118,11 +118,11 @@
},
"charset-normalizer": {
"hashes": [
"sha256:5189b6f22b01957427f35b6a08d9a0bc45b46d3788ef5a92e978433c7a35f8a5",
"sha256:575e708016ff3a5e3681541cb9d79312c416835686d054a23accb873b254f413"
"sha256:5a3d016c7c547f69d6f81fb0db9449ce888b418b5b9952cc5e6e66843e9dd845",
"sha256:83e9a75d1911279afd89352c68b45348559d1fc0506b054b346651b5e7fee29f"
],
"markers": "python_version >= '3.6'",
"version": "==2.1.0"
"version": "==2.1.1"
},
"click": {
"hashes": [
@ -196,7 +196,7 @@
"sha256:637245b8bab2b6502fcbc752cc4b7a6f6243bb02b31c5c26156ad103d3d45670",
"sha256:7401a975809ea1fdc658c3aa4f78cc2195a0e019c5cbc4c06122884e9ae80c23"
],
"markers": "python_version < '3.10'",
"markers": "python_version >= '3.7'",
"version": "==4.12.0"
},
"jinja2": {
@ -697,11 +697,11 @@
},
"urllib3": {
"hashes": [
"sha256:c33ccba33c819596124764c23a97d25f32b28433ba0dedeb77d873a38722c9bc",
"sha256:ea6e8fb210b19d950fab93b60c9009226c63a28808bc8386e05301e25883ac0a"
"sha256:3fa96cf423e6987997fc326ae8df396db2a8b7c667747d47ddd8ecba91f4a74e",
"sha256:b930dd878d5a8afb066a637fbb35144fe7901e3b209d1cd4f524bd0e9deee997"
],
"markers": "python_version >= '2.7' and python_version not in '3.0, 3.1, 3.2, 3.3, 3.4, 3.5' and python_version < '4'",
"version": "==1.26.11"
"version": "==1.26.12"
},
"watchdog": {
"hashes": [

View File

@ -84,7 +84,7 @@ This website uses [`mkdocs-material-insiders`](https://squidfunk.github.io/mkdoc
- `git submodule init`
- `git submodule update docs/assets/brand`
- `git config gpg.ssh.allowedSignersFile .allowed_signers`
2. Install [Python 3.6+](https://www.python.org/downloads/)
2. Install [Python 3.6+](https://www.python.org/downloads/) (currently only tested with 3.10)
3. Install [dependencies](/Pipfile): `pip install mkdocs mkdocs-material mkdocs-static-i18n typing-extensions`
4. Serve the site locally: `mkdocs serve`
- The site will be available at `http://localhost:8000`
@ -95,10 +95,10 @@ This website uses [`mkdocs-material-insiders`](https://squidfunk.github.io/mkdoc
1. Clone this repository and submodules: `git clone --recurse-submodules https://github.com/privacyguides/privacyguides.org.git`
2. Enable SSH commit verification with our local [`.allowed_signers`](/.allowed_signers) file: `git config gpg.ssh.allowedSignersFile .allowed_signers`
3. Install Python **3.7**
3. Install Python **3.10**
4. Install **pipenv**: `pip install pipenv`
5. Install dependencies: `pipenv install --dev`
6. Serve the site locally: `pipenv run mkdocs serve --config-file mkdocs.production.yml`
5. Install dependencies: `pipenv install --dev` (install [Pillow and CairoSVG](https://squidfunk.github.io/mkdocs-material/setup/setting-up-social-cards/#dependencies) as well to generate social cards)
6. Serve the site locally: `pipenv run mkdocs serve --config-file mkdocs.production.yml` (set `CARDS=true` to generate social cards)
- The site will be available at `http://localhost:8000`
- You can build the site locally with `pipenv run mkdocs build`
- This version of the site should be identical to the live, production version
@ -111,10 +111,5 @@ If you commit to `main` with commits signed with your SSH key, you should add yo
- [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 2 until a massive revamp (v1 -> v2 was the Jekyll to MkDocs transition).
2. Push the tag to GitHub: `git push --tags`
3. [Create a new release](https://github.com/privacyguides/privacyguides.org/releases/new) selecting the new tag
- Title the release the same as the tag version number, i.e. `v2.X.X`
- For more significant releases, add a **short** title, for example [v2.3.0 - Localization Support](https://github.com/privacyguides/privacyguides.org/releases/tag/v2.3.0) or [v2.2.0 - Removing Social Networks](https://github.com/privacyguides/privacyguides.org/releases/tag/v2.2.0)
- GitHub should let you auto-generate release notes based on PR titles
- Mark more significant changes in bold, see [v2.12.0](https://github.com/privacyguides/privacyguides.org/releases/tag/v2.12.0) for example
4. Publish release, it will be deployed to the live site automatically
3. A draft release will be created on GitHub. Publish the release and it will be deployed to the live site automatically.
- When publishing more significant releases (generally any with a MINOR version increment) check the "Create a discussion for this release" box to post an announcement

View File

@ -22,6 +22,13 @@ plugins:
date_from_meta:
as_creation: "created"
datetime_format: "%Y-%m-%d"
social:
cards: !ENV [CARDS, false]
cards_color:
fill: "#FFD06F"
text: "#2d2d2d"
cards_dir: assets/img/social
cards_font: 'Public Sans'
extra:
generator: false

View File

@ -4,7 +4,7 @@ site_dir: 'site'
site_name: Privacy Guides
site_description: |
Massive organizations are monitoring your online activities. Privacy Guides is your central privacy and security resource to protect yourself online.
Privacy Guides is your central privacy and security resource to protect yourself online.
copyright: |
<b>Privacy Guides</b> is a non-profit, socially motivated website that provides information for protecting your data security and privacy.<br>
We do not make money from recommending certain products, and we do not utilize affiliate links.<br>
@ -34,6 +34,7 @@ edit_uri: edit/main/docs/
theme:
name: material
custom_dir: theme
logo: assets/brand/SVG/Logo/privacy-guides-logo-notext-colorbg.svg
favicon: assets/brand/PNG/Favicon/favicon-32x32.png
icon:
repo: fontawesome/brands/github