-
-
Notifications
You must be signed in to change notification settings - Fork 207
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add run.sh script to project (#2517)
- Loading branch information
1 parent
a806539
commit a0aa107
Showing
14 changed files
with
304 additions
and
286 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -45,62 +45,20 @@ jobs: | |
run: | | ||
{ | ||
echo "BUILD_CONTEXT=${{ inputs.context }}" | ||
echo "BUILD_EDIT_URI_TEMPLATE=blob/main/docs/{path}?plain=1" | ||
echo "BUILD_REPO_URL=https://github.com/privacyguides/privacyguides.org" | ||
echo "PRODUCTION=true" | ||
echo "EXTRA_FLAGS=""$EXTRA_FLAGS" --production"" | ||
} >> "$GITHUB_ENV" | ||
- name: Set Metadata for Privileged Builds | ||
if: inputs.privileged | ||
run: echo "BUILD_INSIDERS=true" >> "$GITHUB_ENV" | ||
run: | | ||
echo "BUILD_INSIDERS=true" >> "$GITHUB_ENV" | ||
echo "EXTRA_FLAGS=""$EXTRA_FLAGS" --insiders"" >> "$GITHUB_ENV" | ||
- name: Set Metadata for Offline Mode | ||
if: inputs.config == 'offline' | ||
run: | | ||
{ | ||
echo "BUILD_EDIT_URI_TEMPLATE=''" | ||
echo "BUILD_OFFLINE=true" | ||
echo "BUILD_REPO_URL=''" | ||
echo "CARDS=false" | ||
echo "HOMEPAGE_BUTTON_GET_STARTED_LINK=basics/why-privacy-matters.html" | ||
echo "HOMEPAGE_BUTTON_TOOLS_LINK=tools.html" | ||
} >> "$GITHUB_ENV" | ||
- name: Set Metadata for Translations | ||
if: inputs.lang != 'en' | ||
run: | | ||
{ | ||
echo "BUILD_ABBREVIATIONS=includes/abbreviations.${{ inputs.lang }}.txt" | ||
echo "BUILD_DOCS_DIR=i18n/${{ inputs.lang }}" | ||
echo "BUILD_EDIT_URI_TEMPLATE=https://github.com/privacyguides/i18n/blob/main/i18n/${{ inputs.lang }}/{path}?plain=1" | ||
echo "BUILD_SITE_DIR=site/${{ inputs.lang }}" | ||
echo "BUILD_SITE_URL=https://privacyguides.org/${{ inputs.lang }}" | ||
echo "BUILD_THEME_LANGUAGE=${{ inputs.lang }}" | ||
} >> "$GITHUB_ENV" | ||
- name: Set Metadata for Hebrew Translation | ||
if: inputs.lang == 'he' | ||
run: | | ||
{ | ||
echo "BUILD_THEME_FONT_CODE=Cousine" | ||
echo "BUILD_THEME_FONT_TEXT=Open Sans" | ||
echo "TRANSLATION_STYLESHEET=assets/stylesheets/lang-${{ inputs.lang }}.css?v=20240410" | ||
} >> "$GITHUB_ENV" | ||
- name: Set Metadata for Russian Translation | ||
if: inputs.lang == 'ru' | ||
run: | | ||
{ | ||
echo "TRANSLATION_STYLESHEET=assets/stylesheets/lang-${{ inputs.lang }}.css?v=20240410" | ||
} >> "$GITHUB_ENV" | ||
- name: Set Metadata for Chinese (Traditional) Translation | ||
if: inputs.lang == 'zh-Hant' | ||
run: | | ||
{ | ||
echo "BUILD_THEME_FONT_CODE=Noto Sans TC" | ||
echo "BUILD_THEME_FONT_TEXT=Noto Sans TC" | ||
echo "TRANSLATION_STYLESHEET=assets/stylesheets/lang-${{ inputs.lang }}.css?v=20240410" | ||
echo "EXTRA_FLAGS=""$EXTRA_FLAGS" --offline"" | ||
} >> "$GITHUB_ENV" | ||
- name: Download Repository | ||
|
@@ -189,24 +147,10 @@ jobs: | |
pip install mkdocs-material | ||
sudo apt install pngquant | ||
- name: Set Translated String Environment Variables | ||
uses: falti/[email protected] | ||
with: | ||
path: includes/strings.${{ inputs.lang }}.env | ||
export-variables: true | ||
keys-case: bypass | ||
|
||
- name: Build Website | ||
if: inputs.privileged | ||
run: | | ||
pipenv run mkdocs build --config-file mkdocs-production.yml | ||
pipenv run mkdocs --version | ||
- name: Build Website (Unprivileged) | ||
if: ${{ !inputs.privileged }} | ||
run: | | ||
mkdocs build | ||
mkdocs --version | ||
eval ./run.sh --build "$EXTRA_FLAGS" | ||
- name: Package Website | ||
run: | | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,3 +22,4 @@ node_modules | |
# Python | ||
.venv | ||
.env | ||
.mkdocs-insiders-* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
Daniel Gray <[email protected]> <[email protected]> | ||
Daniel Gray <[email protected]> <[email protected]> | ||
Daniel Gray <[email protected]> <[email protected]> | ||
Daniel Gray <[email protected]> | ||
Jonah Aragon <[email protected]> <[email protected]> | ||
Jonah Aragon <[email protected]> <[email protected]> | ||
Jonah Aragon <[email protected]> <[email protected]> | ||
mfwmyfacewhen <[email protected]> <[email protected]> | ||
mbananasynergy <[email protected]> <> | ||
mbananasynergy <[email protected]> <[email protected]> | ||
rollsicecream <[email protected]> <[email protected]> | ||
rollsicecream <[email protected]> <[email protected]> | ||
Freddy <[email protected]> <[email protected]> | ||
Freddy <[email protected]> <[email protected]> | ||
Niek de Wilde <[email protected]> <[email protected]> | ||
Niek de Wilde <[email protected]> <[email protected]> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.