mirror of
https://github.com/privacyguides/privacyguides.org.git
synced 2025-08-06 02:41:03 +00:00
ci: Allow blog builds from unprivileged forks
This commit is contained in:
18
.github/workflows/build-blog.yml
vendored
18
.github/workflows/build-blog.yml
vendored
@@ -65,6 +65,10 @@ jobs:
|
||||
with:
|
||||
cache: "pipenv"
|
||||
|
||||
- name: Install Python (no pipenv)
|
||||
if: ${{ !inputs.privileged }}
|
||||
uses: actions/setup-python@v5
|
||||
|
||||
- name: Install Python Dependencies
|
||||
if: inputs.privileged
|
||||
run: |
|
||||
@@ -72,10 +76,22 @@ jobs:
|
||||
pipenv install
|
||||
sudo apt install pngquant
|
||||
|
||||
- name: Build Website
|
||||
- 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.blog.yml
|
||||
|
||||
- name: Build Website (Unprivileged)
|
||||
if: ${{ !inputs.privileged }}
|
||||
run: |
|
||||
BUILD_INSIDERS=false mkdocs build --config-file mkdocs.blog.yml
|
||||
|
||||
- name: Package Website
|
||||
run: |
|
||||
tar -czf site-build-blog.tar.gz site
|
||||
|
Reference in New Issue
Block a user