Skip to content

Commit 2471612

Browse files
committed
Remove per-language config files (#2513)
1 parent 1acdf17 commit 2471612

27 files changed

+463
-522
lines changed

.cache/plugin/social/fonts

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../theme/assets/brand/fonts

.devcontainer/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
"name": "Privacy Guides",
55
"image": "ghcr.io/squidfunk/mkdocs-material:9.5.17",
66
"forwardPorts": [8000],
7-
"postCreateCommand": "git submodule init; git submodule update theme/assets/brand; mkdocs serve --dev-addr=0.0.0.0:8000 --config-file config/mkdocs.en.yml"
7+
"postCreateCommand": "git submodule init; git submodule update theme/assets/brand; mkdocs serve --dev-addr=0.0.0.0:8000"
88
}

.devcontainer/team/devcontainer.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@
44
"name": "Privacy Guides Team",
55
"image": "ghcr.io/privacyguides/privacyguides.org:main",
66
"forwardPorts": [8000],
7-
"postCreateCommand": "git submodule init; git submodule update theme/assets/brand; MKDOCS_INHERIT=mkdocs-production.yml mkdocs serve --dev-addr=0.0.0.0:8000 --config-file config/mkdocs.en.yml"
7+
"postCreateCommand": "git submodule init; git submodule update theme/assets/brand; mkdocs serve --dev-addr=0.0.0.0:8000 --config-file mkdocs-production.yml"
88
}

.github/workflows/build-container.yml

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
#
21
name: ☁️ Build Container
32

43
# Configures this workflow to run every time a change is pushed to the branch called `release`.

.github/workflows/build-pr.yml

+116
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: 🛠️ Build PR Preview
2+
3+
on:
4+
pull_request:
5+
6+
concurrency:
7+
group: ${{github.event.pull_request.head.ref}}
8+
cancel-in-progress: true
9+
10+
permissions:
11+
contents: read
12+
13+
jobs:
14+
metadata:
15+
runs-on: ubuntu-latest
16+
outputs:
17+
submodules: ${{ steps.submodules-fork.outputs.submodules || steps.submodules-main.outputs.submodules }}
18+
privileged: ${{ steps.submodules-fork.outputs.privileged || steps.submodules-main.outputs.privileged }}
19+
env:
20+
ACTIONS_SSH_KEY: ${{ secrets.ACTIONS_SSH_KEY }}
21+
steps:
22+
- name: Set submodules for fork
23+
if: env.ACTIONS_SSH_KEY == ''
24+
id: submodules-fork
25+
run: |
26+
echo 'submodules={"repo":["brand","i18n"]}' >> "$GITHUB_OUTPUT"
27+
echo "privileged=false" >> "$GITHUB_OUTPUT"
28+
29+
- name: Set submodules for main repo
30+
if: env.ACTIONS_SSH_KEY != ''
31+
id: submodules-main
32+
run: |
33+
echo 'submodules={"repo":["brand","i18n","mkdocs-material-insiders"]}' >> "$GITHUB_OUTPUT"
34+
echo "privileged=true" >> "$GITHUB_OUTPUT"
35+
36+
- name: Save PR metadata
37+
run: |
38+
mkdir -p ./metadata
39+
echo ${{ github.event.number }} > ./metadata/NR
40+
echo ${{ github.event.pull_request.head.sha }} > ./metadata/SHA
41+
42+
- name: Upload metadata as artifact
43+
uses: actions/upload-artifact@v4
44+
with:
45+
name: metadata
46+
path: metadata
47+
48+
submodule:
49+
needs: metadata
50+
strategy:
51+
matrix: ${{ fromJson(needs.metadata.outputs.submodules) }}
52+
uses: privacyguides/.github/.github/workflows/download-repo.yml@main
53+
with:
54+
repo: ${{ matrix.repo }}
55+
privileged: ${{ fromJSON(needs.metadata.outputs.privileged) }}
56+
secrets:
57+
ACTIONS_SSH_KEY: ${{ secrets.ACTIONS_SSH_KEY }}
58+
59+
build_english:
60+
needs: [submodule, metadata]
61+
strategy:
62+
matrix:
63+
lang: [en]
64+
fail-fast: true
65+
uses: ./.github/workflows/build.yml
66+
with:
67+
ref: ${{github.event.pull_request.head.ref}}
68+
repo: ${{github.event.pull_request.head.repo.full_name}}
69+
lang: en
70+
continue-on-error: false
71+
privileged: ${{ fromJSON(needs.metadata.outputs.privileged) }}
72+
73+
build_i18n:
74+
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci:build i18n') }}
75+
needs: [submodule, metadata]
76+
strategy:
77+
matrix:
78+
lang: [es, fr, he, it, nl, ru, zh-Hant]
79+
fail-fast: false
80+
uses: ./.github/workflows/build.yml
81+
with:
82+
ref: ${{github.event.pull_request.head.ref}}
83+
repo: ${{github.event.pull_request.head.repo.full_name}}
84+
lang: ${{ matrix.lang }}
85+
continue-on-error: true
86+
privileged: ${{ fromJSON(needs.metadata.outputs.privileged) }}
87+
88+
combine_build:
89+
needs: [build_english, build_i18n]
90+
if: |
91+
(always() && !cancelled() && !failure()) &&
92+
needs.build_english.result == 'success' &&
93+
(needs.build_i18n.result == 'success' || needs.build_i18n.result == 'skipped')
94+
95+
runs-on: ubuntu-latest
96+
steps:
97+
- uses: actions/download-artifact@v4
98+
with:
99+
pattern: site-build-*
100+
merge-multiple: true
101+
102+
- run: |
103+
for file in *.tar.gz; do tar -zxf "$file"; done
104+
ls -la site/
105+
106+
- name: Upload Site
107+
uses: actions/upload-artifact@v4
108+
with:
109+
name: site-build-combined
110+
path: site
111+
retention-days: 5
112+
113+
cleanup:
114+
if: ${{ always() }}
115+
needs: [build_english, build_i18n]
116+
uses: privacyguides/.github/.github/workflows/cleanup.yml@main

0 commit comments

Comments
 (0)