mirror of
https://github.com/privacyguides/privacyguides.org.git
synced 2025-05-09 17:55:24 -04:00
feat!: Add videos section to website (#2861)
This commit is contained in:
parent
d904114f81
commit
c3e2dc65d8
18 changed files with 848 additions and 14 deletions
17
.github/workflows/build-pr.yml
vendored
17
.github/workflows/build-pr.yml
vendored
|
@ -99,13 +99,24 @@ jobs:
|
|||
continue-on-error: true
|
||||
privileged: ${{ fromJSON(needs.metadata.outputs.privileged) }}
|
||||
|
||||
build_videos:
|
||||
if: ${{ contains(github.event.pull_request.labels.*.name, 'ci:build videos') }}
|
||||
needs: [submodule, metadata]
|
||||
uses: ./.github/workflows/build-videos.yml
|
||||
with:
|
||||
ref: ${{github.event.pull_request.head.ref}}
|
||||
repo: ${{github.event.pull_request.head.repo.full_name}}
|
||||
continue-on-error: true
|
||||
privileged: ${{ fromJSON(needs.metadata.outputs.privileged) }}
|
||||
|
||||
combine_build:
|
||||
needs: [build_english, build_i18n, build_blog]
|
||||
needs: [build_english, build_i18n, build_blog, build_videos]
|
||||
if: |
|
||||
(always() && !cancelled() && !failure()) &&
|
||||
needs.build_english.result == 'success' &&
|
||||
(needs.build_i18n.result == 'success' || needs.build_i18n.result == 'skipped') &&
|
||||
(needs.build_blog.result == 'success' || needs.build_blog.result == 'skipped')
|
||||
(needs.build_blog.result == 'success' || needs.build_blog.result == 'skipped') &&
|
||||
(needs.build_videos.result == 'success' || needs.build_videos.result == 'skipped')
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
@ -127,5 +138,5 @@ jobs:
|
|||
|
||||
cleanup:
|
||||
if: ${{ always() }}
|
||||
needs: [build_english, build_i18n, build_blog]
|
||||
needs: [build_english, build_i18n, build_blog, build_videos]
|
||||
uses: privacyguides/.github/.github/workflows/cleanup.yml@main
|
||||
|
|
104
.github/workflows/build-videos.yml
vendored
Normal file
104
.github/workflows/build-videos.yml
vendored
Normal file
|
@ -0,0 +1,104 @@
|
|||
name: 🛠️ Build Videos
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
ref:
|
||||
required: true
|
||||
type: string
|
||||
repo:
|
||||
required: true
|
||||
type: string
|
||||
context:
|
||||
type: string
|
||||
default: deploy-preview
|
||||
continue-on-error:
|
||||
type: boolean
|
||||
default: true
|
||||
privileged:
|
||||
type: boolean
|
||||
default: true
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
continue-on-error: ${{ inputs.continue-on-error }}
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
steps:
|
||||
- name: Add GitHub Token to Environment
|
||||
run: |
|
||||
echo "GH_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Download Repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
repository: ${{ inputs.repo }}
|
||||
ref: ${{ inputs.ref }}
|
||||
persist-credentials: "false"
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Download Submodules
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
pattern: repo-*
|
||||
path: modules
|
||||
|
||||
- name: Move mkdocs-material-insiders to mkdocs-material
|
||||
if: inputs.privileged
|
||||
run: |
|
||||
rmdir modules/mkdocs-material
|
||||
mv modules/repo-mkdocs-material-insiders modules/mkdocs-material
|
||||
|
||||
- name: Move brand submodule to theme/assets/brand
|
||||
run: |
|
||||
rmdir theme/assets/brand
|
||||
mv modules/repo-brand theme/assets/brand
|
||||
|
||||
- name: Install Python (pipenv)
|
||||
if: inputs.privileged
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
cache: "pipenv"
|
||||
|
||||
- name: Install Python (no pipenv)
|
||||
if: ${{ !inputs.privileged }}
|
||||
uses: actions/setup-python@v5
|
||||
|
||||
- name: Install Python Dependencies
|
||||
if: inputs.privileged
|
||||
run: |
|
||||
pip install pipenv
|
||||
pipenv install
|
||||
sudo apt install pngquant
|
||||
|
||||
- name: Install Python Dependencies (Unprivileged)
|
||||
if: ${{ !inputs.privileged }}
|
||||
run: |
|
||||
pip install mkdocs-material mkdocs-rss-plugin mkdocs-glightbox mkdocs-macros-plugin
|
||||
sudo apt install pngquant
|
||||
|
||||
- name: Build Website (Privileged)
|
||||
if: inputs.privileged
|
||||
run: |
|
||||
pipenv run mkdocs build --config-file mkdocs.videos.yml
|
||||
|
||||
- name: Build Website (Unprivileged)
|
||||
if: ${{ !inputs.privileged }}
|
||||
run: |
|
||||
BUILD_INSIDERS=false mkdocs build --config-file mkdocs.videos.yml
|
||||
|
||||
- name: Package Website
|
||||
run: |
|
||||
tar -czf site-build-videos.tar.gz site
|
||||
|
||||
- name: Upload Site
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: site-build-videos.tar.gz
|
||||
path: site-build-videos.tar.gz
|
||||
retention-days: 1
|
|
@ -18,7 +18,7 @@
|
|||
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
||||
# IN THE SOFTWARE.
|
||||
|
||||
name: 📦 Release Blog
|
||||
name: 📦 Immediate Releases
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
@ -27,6 +27,7 @@ on:
|
|||
- "main"
|
||||
paths:
|
||||
- "blog/**"
|
||||
- "videos/**"
|
||||
|
||||
concurrency:
|
||||
group: release-deployment
|
||||
|
@ -42,7 +43,7 @@ jobs:
|
|||
submodule:
|
||||
strategy:
|
||||
matrix:
|
||||
repo: [mkdocs-material-insiders, brand, i18n]
|
||||
repo: [mkdocs-material-insiders, brand]
|
||||
uses: privacyguides/.github/.github/workflows/download-repo.yml@main
|
||||
with:
|
||||
repo: ${{ matrix.repo }}
|
||||
|
@ -59,8 +60,18 @@ jobs:
|
|||
ref: ${{ github.ref }}
|
||||
continue-on-error: false
|
||||
|
||||
build_videos:
|
||||
needs: submodule
|
||||
permissions:
|
||||
contents: read
|
||||
uses: ./.github/workflows/build-videos.yml
|
||||
with:
|
||||
repo: ${{ github.repository }}
|
||||
ref: ${{ github.ref }}
|
||||
continue-on-error: false
|
||||
|
||||
deploy:
|
||||
needs: [build_blog]
|
||||
needs: [build_blog, build_videos]
|
||||
uses: privacyguides/webserver/.github/workflows/deploy-garage.yml@main
|
||||
with:
|
||||
environment: production
|
||||
|
@ -70,5 +81,5 @@ jobs:
|
|||
|
||||
cleanup:
|
||||
if: ${{ always() }}
|
||||
needs: [build_blog]
|
||||
needs: [build_blog, build_videos]
|
||||
uses: privacyguides/.github/.github/workflows/cleanup.yml@main
|
14
.github/workflows/publish-release.yml
vendored
14
.github/workflows/publish-release.yml
vendored
|
@ -74,6 +74,16 @@ jobs:
|
|||
ref: ${{ github.ref }}
|
||||
continue-on-error: false
|
||||
|
||||
build_videos:
|
||||
needs: submodule
|
||||
permissions:
|
||||
contents: read
|
||||
uses: ./.github/workflows/build-videos.yml
|
||||
with:
|
||||
repo: ${{ github.repository }}
|
||||
ref: ${{ github.ref }}
|
||||
continue-on-error: false
|
||||
|
||||
release:
|
||||
name: Create release notes
|
||||
needs: build
|
||||
|
@ -95,7 +105,7 @@ jobs:
|
|||
makeLatest: true
|
||||
|
||||
deploy:
|
||||
needs: [build, build_blog]
|
||||
needs: [build, build_blog, build_videos]
|
||||
uses: privacyguides/webserver/.github/workflows/deploy-all.yml@main
|
||||
secrets:
|
||||
NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
|
||||
|
@ -112,5 +122,5 @@ jobs:
|
|||
|
||||
cleanup:
|
||||
if: ${{ always() }}
|
||||
needs: [build, build_blog]
|
||||
needs: [build, build_blog, build_videos]
|
||||
uses: privacyguides/.github/.github/workflows/cleanup.yml@main
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue