1
0
mirror of https://github.com/privacyguides/privacyguides.org.git synced 2025-07-02 01:32:41 +00:00

Link to mirrors in README (#2507)

Signed-off-by: Daniel Gray <dngray@privacyguides.org>
This commit is contained in:
2024-04-10 10:52:09 +00:00
committed by Daniel Gray
parent a57dc2cd78
commit 6458a05355
8 changed files with 73 additions and 18 deletions

View File

@ -4,7 +4,7 @@ name: ☁️ Build Container
# Configures this workflow to run every time a change is pushed to the branch called `release`.
on:
push:
branches: ['main']
branches: ["main"]
release:
types: [published]
workflow_dispatch:

View File

@ -34,18 +34,20 @@ jobs:
steps:
- run: |
echo "GH_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
echo "GH_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> "$GITHUB_ENV"
- if: inputs.config == 'build'
run: |
echo "MKDOCS_INHERIT=mkdocs-production.yml" >> $GITHUB_ENV
echo "PRODUCTION=true" >> $GITHUB_ENV
echo "CONTEXT=${{ inputs.context }}" >> $GITHUB_ENV
{
echo "MKDOCS_INHERIT=mkdocs-production.yml"
echo "PRODUCTION=true"
echo "CONTEXT=${{ inputs.context }}"
} >> "$GITHUB_ENV"
- if: inputs.config == 'offline'
run: |
echo "MKDOCS_INHERIT=mkdocs-offline.yml" >> $GITHUB_ENV
echo "CARDS=false" >> $GITHUB_ENV
echo "MKDOCS_INHERIT=mkdocs-offline.yml" >> "$GITHUB_ENV"
echo "CARDS=false" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
with:
@ -76,6 +78,7 @@ jobs:
cache: "pipenv"
- uses: actions/cache/restore@v4.0.2
id: site_cache_restore
with:
key: site-cache-${{ inputs.repo }}-${{ inputs.ref }}-${{ hashfiles('.cache/**') }}
path: .cache
@ -84,6 +87,7 @@ jobs:
site-cache-${{ inputs.repo }}-
- uses: actions/cache/restore@v4.0.2
id: card_cache_restore
with:
key: card-cache-${{ inputs.repo }}-${{ inputs.lang }}-${{ inputs.ref }}-${{ hashfiles('config/.cache/plugin/social/manifest.json') }}
path: |
@ -110,11 +114,13 @@ jobs:
tar -czvf site-${{ inputs.config }}-${{ inputs.lang }}.tar.gz site
- uses: actions/cache/save@v4.0.2
if: steps.site_cache_restore.outputs.cache-hit != 'true'
with:
key: site-cache-${{ inputs.repo }}-${{ inputs.ref }}-${{ hashfiles('.cache/**') }}
path: .cache
- uses: actions/cache/save@v4.0.2
if: steps.card_cache_restore.outputs.cache-hit != 'true'
with:
key: card-cache-${{ inputs.repo }}-${{ inputs.lang }}-${{ inputs.ref }}-${{ hashfiles('config/.cache/plugin/social/manifest.json') }}
path: |

View File

@ -42,23 +42,19 @@ jobs:
strategy:
matrix:
lang: [en, es, fr, he, it, nl, ru, zh-Hant]
build: [build, offline]
fail-fast: false
permissions:
contents: read
uses: ./.github/workflows/build.yml
with:
config: ${{ matrix.build }}
ref: ${{ github.ref }}
repo: ${{ github.repository }}
lang: ${{ matrix.lang }}
continue-on-error: true
buildoffline:
needs: submodule
permissions:
contents: read
uses: ./.github/workflows/build-offline.yml
cleanup:
if: ${{ always() }}
needs: [build, buildoffline]
needs: build
uses: privacyguides/.github/.github/workflows/cleanup.yml@main

View File

@ -50,6 +50,56 @@ jobs:
with:
fetch-depth: 0
- name: Configure markdown-link-check
run: |
cat <<EOT >> .markdown-link-check.json
{
"ignorePatterns": [
{
"pattern": "^https://twitter.com"
},
{
"pattern": "^https://reddit.com"
},
{
"pattern": "^#_"
},
{
"pattern": ".onion"
},
{
"pattern": "^https://en.opensuse.org"
},
{
"pattern": "^https://quad9.net"
},
{
"pattern": "^https://dnscrypt.info"
},
{
"pattern": "^https://pipewire.org"
}
],
"replacementPatterns": [
{
"pattern": "^assets/",
"replacement": "https://www.privacyguides.org/en/assets/"
},
{
"pattern": "^(../)*assets/",
"replacement": "https://www.privacyguides.org/en/assets/"
},
{
"pattern": "^/",
"replacement": "https://www.privacyguides.org/"
}
],
"retryOn429": true,
"retryCount": 5,
"aliveStatusCodes": [200, 206, 403]
}
EOT
- id: ml
# You can override MegaLinter flavor used to have faster performances
# More info at https://megalinter.io/flavors/