Optimized PR Previews

This commit is contained in:
Jonah Aragon 2022-04-26 21:36:58 -05:00
parent 8aacb15e21
commit 0f4a35d003
No known key found for this signature in database
GPG Key ID: E147BA439A59846D

View File

@ -19,25 +19,13 @@ jobs:
fetch-depth: '0'
ref: ${{github.event.pull_request.head.ref}}
repository: ${{github.event.pull_request.head.repo.full_name}}
ssh-key: ${{ secrets.ACTIONS_SSH_KEY }}
submodules: 'true'
- name: Set up Python runtime
uses: actions/setup-python@v3
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install Python dependencies
run: |
pip install 'mkdocs>=1.3.0'
pip install mkdocs-static-i18n
pip install mkdocs-git-revision-date-localized-plugin
- 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/privacyguides/mkdocs-material-insiders.git
pip install -e mkdocs-material-insiders
python-version: '3.7'
- name: Deploy to surge.sh
uses: afc163/surge-preview@v1
@ -46,5 +34,8 @@ jobs:
github_token: ${{ secrets.GITHUB_TOKEN }}
dist: site
teardown: 'true'
failOnError: 'true'
build: |
mkdocs build
pip install pipenv
pipenv install
pipenv run mkdocs build