-
-
Notifications
You must be signed in to change notification settings - Fork 208
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'privacyguides:main' into pr-accessibility
- Loading branch information
Showing
49 changed files
with
814 additions
and
426 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
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 |
---|---|---|
|
@@ -27,6 +27,9 @@ on: | |
strict: | ||
type: boolean | ||
default: false | ||
cache: | ||
type: boolean | ||
default: true | ||
|
||
permissions: | ||
contents: read | ||
|
@@ -119,6 +122,7 @@ jobs: | |
- name: Restore Privacy Plugin Cache | ||
uses: actions/cache/[email protected] | ||
id: privacy_cache_restore | ||
if: inputs.cache | ||
with: | ||
key: privacy-cache-${{ inputs.repo }}-${{ hashfiles('.cache/plugin/privacy/**') }} | ||
path: | | ||
|
@@ -131,6 +135,7 @@ jobs: | |
- name: Restore Social Plugin Cache | ||
uses: actions/cache/[email protected] | ||
id: social_cache_restore | ||
if: inputs.cache | ||
with: | ||
key: social-cache-${{ inputs.repo }}-${{ inputs.lang }}-${{ hashfiles('.cache/plugin/social/manifest.json') }} | ||
path: | | ||
|
@@ -143,6 +148,7 @@ jobs: | |
- name: Restore Optimize Plugin Cache | ||
uses: actions/cache/[email protected] | ||
id: optimize_cache_restore | ||
if: inputs.cache | ||
with: | ||
key: optimize-cache-${{ inputs.repo }}-${{ hashfiles('.cache/plugin/optimize/manifest.json') }} | ||
path: | | ||
|
@@ -176,7 +182,7 @@ jobs: | |
- name: Find Privacy Plugin Cache | ||
uses: actions/cache/[email protected] | ||
if: steps.privacy_cache_restore.outputs.cache-hit != 'true' | ||
if: steps.privacy_cache_restore.outputs.cache-hit != 'true' && inputs.cache | ||
id: privacy_cache_test | ||
with: | ||
key: privacy-cache-privacyguides/privacyguides.org-${{ hashfiles('.cache/plugin/privacy/**') }} | ||
|
@@ -186,7 +192,7 @@ jobs: | |
- name: Find Social Plugin Cache | ||
uses: actions/cache/[email protected] | ||
if: steps.social_cache_restore.outputs.cache-hit != 'true' | ||
if: steps.social_cache_restore.outputs.cache-hit != 'true' && inputs.cache | ||
id: social_cache_test | ||
with: | ||
key: social-cache-privacyguides/privacyguides.org-${{ inputs.lang }}-${{ hashfiles('.cache/plugin/social/manifest.json') }} | ||
|
@@ -197,7 +203,7 @@ jobs: | |
- name: Find Optimize Plugin Cache | ||
uses: actions/cache/[email protected] | ||
if: steps.optimize_cache_restore.outputs.cache-hit != 'true' | ||
if: steps.optimize_cache_restore.outputs.cache-hit != 'true' && inputs.cache | ||
id: optimize_cache_test | ||
with: | ||
key: optimize-cache-privacyguides/privacyguides.org-${{ hashfiles('.cache/plugin/optimize/manifest.json') }} | ||
|
@@ -207,14 +213,14 @@ jobs: | |
- name: Save Privacy Plugin Cache | ||
uses: actions/cache/[email protected] | ||
if: steps.privacy_cache_test.outputs.cache-hit != 'true' | ||
if: steps.privacy_cache_test.outputs.cache-hit != 'true' && inputs.cache | ||
with: | ||
key: privacy-cache-${{ inputs.repo }}-${{ hashfiles('.cache/plugin/privacy/**') }} | ||
path: .cache/plugin/privacy | ||
|
||
- name: Save Social Plugin Cache | ||
uses: actions/cache/[email protected] | ||
if: steps.social_cache_test.outputs.cache-hit != 'true' | ||
if: steps.social_cache_test.outputs.cache-hit != 'true' && inputs.cache | ||
with: | ||
key: social-cache-${{ inputs.repo }}-${{ inputs.lang }}-${{ hashfiles('.cache/plugin/social/manifest.json') }} | ||
path: | | ||
|
@@ -223,7 +229,7 @@ jobs: | |
- name: Save Optimize Plugin Cache | ||
uses: actions/cache/[email protected] | ||
if: steps.optimize_cache_test.outputs.cache-hit != 'true' | ||
if: steps.optimize_cache_test.outputs.cache-hit != 'true' && inputs.cache | ||
with: | ||
key: optimize-cache-${{ inputs.repo }}-${{ hashfiles('.cache/plugin/optimize/manifest.json') }} | ||
path: .cache/plugin/optimize | ||
|
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 |
---|---|---|
|
@@ -51,14 +51,3 @@ jobs: | |
with: | ||
source-repo: "[email protected]:privacyguides/privacyguides.org.git" | ||
destination-repo: "[email protected]:privacyguides/privacyguides.org.git" | ||
|
||
sourcehut: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Mirror to SourceHut | ||
uses: wearerequired/git-mirror-action@v1 | ||
env: | ||
SSH_PRIVATE_KEY: ${{ secrets.ACTIONS_SSH_KEY }} | ||
with: | ||
source-repo: "[email protected]:privacyguides/privacyguides.org.git" | ||
destination-repo: "[email protected]:~jonaharagon/privacyguides.org" |
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,6 +22,7 @@ jobs: | |
outputs: | ||
pr_number: ${{ steps.metadata.outputs.pr_number }} | ||
sha: ${{ steps.metadata.outputs.sha }} | ||
privileged: ${{ steps.metadata.outputs.privileged }} | ||
|
||
steps: | ||
- name: Download Website Build Artifact | ||
|
@@ -86,8 +87,9 @@ jobs: | |
unzip metadata.zip -d metadata | ||
echo "pr_number=$(cat metadata/NR)" >> "$GITHUB_OUTPUT" | ||
echo "sha=$(cat metadata/SHA)" >> "$GITHUB_OUTPUT" | ||
echo "privileged=$(cat metadata/PRIVILEGED)" >> "$GITHUB_OUTPUT" | ||
deploy: | ||
deploy_netlify: | ||
needs: metadata | ||
permissions: | ||
contents: read | ||
|
@@ -99,15 +101,43 @@ jobs: | |
secrets: | ||
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }} | ||
|
||
deploy_garage: | ||
needs: metadata | ||
permissions: | ||
contents: read | ||
|
||
uses: privacyguides/webserver/.github/workflows/deploy-garage-preview.yml@main | ||
with: | ||
alias: ${{ needs.metadata.outputs.pr_number }} | ||
bucket: ${{ vars.PREVIEW_GARAGE_BUCKET }} | ||
hostname: ${{ vars.PREVIEW_GARAGE_HOSTNAME }} | ||
secrets: | ||
PREVIEW_GARAGE_KEY_ID: ${{ secrets.PREVIEW_GARAGE_KEY_ID }} | ||
PREVIEW_GARAGE_SECRET_KEY: ${{ secrets.PREVIEW_GARAGE_SECRET_KEY }} | ||
|
||
comment: | ||
permissions: | ||
pull-requests: write | ||
needs: [deploy, metadata] | ||
needs: [deploy_garage, metadata] | ||
runs-on: ubuntu-latest | ||
env: | ||
address: ${{ needs.deploy.outputs.address }} | ||
address: ${{ needs.deploy_garage.outputs.address }} | ||
steps: | ||
- uses: thollander/[email protected] | ||
if: ${{ needs.metadata.outputs.privileged == 'true' }} | ||
with: | ||
pr_number: ${{ needs.metadata.outputs.pr_number }} | ||
message: | | ||
### <span aria-hidden="true">✅</span> Your preview is ready! | ||
| Name | Link | | ||
| :---: | ---- | | ||
| <span aria-hidden="true">🔨</span> Latest commit | ${{ needs.metadata.outputs.sha }} | | ||
| <span aria-hidden="true">😎</span> Preview | ${{ env.address }} | | ||
comment_tag: deployment | ||
|
||
- uses: thollander/[email protected] | ||
if: ${{ needs.metadata.outputs.privileged == 'false' }} | ||
with: | ||
pr_number: ${{ needs.metadata.outputs.pr_number }} | ||
message: | | ||
|
@@ -117,4 +147,7 @@ jobs: | |
| :---: | ---- | | ||
| <span aria-hidden="true">🔨</span> Latest commit | ${{ needs.metadata.outputs.sha }} | | ||
| <span aria-hidden="true">😎</span> Preview | ${{ env.address }} | | ||
Please note that this preview was built from an untrusted source, so it was not granted access to all mkdocs-material features. | ||
Maintainers should ensure this PR has been reviewed locally with a full build before merging. | ||
comment_tag: deployment |
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.