mirror of
https://github.com/privacyguides/privacyguides.org.git
synced 2025-08-01 16:21:03 +00:00
Transition to mkdocs (#829)
Co-authored-by: Jonah Aragon <jonah@triplebit.net>
This commit is contained in:
53
.github/workflows/build.yml
vendored
Normal file
53
.github/workflows/build.yml
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
name: Build Website
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
PYTHON_VERSION: 3.x
|
||||
|
||||
jobs:
|
||||
build:
|
||||
name: Build website
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Python runtime
|
||||
uses: actions/setup-python@v3
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
|
||||
- name: Cache files
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
key: ${{ github.ref }}
|
||||
path: .cache
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
pip install 'mkdocs>=1.3.0'
|
||||
|
||||
- name: Install mkdocs-material Insiders build
|
||||
if: github.event.repository.fork == false
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
run: |
|
||||
git clone --depth 1 https://${GH_TOKEN}@github.com/squidfunk/mkdocs-material-insiders.git
|
||||
pip install -e mkdocs-material-insiders
|
||||
|
||||
- name: Build website
|
||||
run: |
|
||||
mkdocs build --config-file mkdocs.production.yml
|
||||
mv .well-known site/
|
||||
tar cvf site.tar site
|
||||
mkdocs --version
|
||||
|
||||
- name: Package website
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: generated-site
|
||||
path: site.tar
|
Reference in New Issue
Block a user