mirror of
https://github.com/MiSTer-devel/MkDocs_MiSTer.git
synced 2026-05-17 03:04:10 +00:00
43 lines
1.1 KiB
YAML
43 lines
1.1 KiB
YAML
name: ci
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
|
|
env:
|
|
PYTHON_VERSION: 3.8
|
|
|
|
jobs:
|
|
deploy:
|
|
name: Build documentation
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout main branch
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Download videos branch and unzip
|
|
run: |
|
|
wget https://codeload.github.com/MiSTer-devel/MkDocs_MiSTer/zip/refs/heads/videos || exit 1
|
|
unzip videos || exit 1
|
|
cd MkDocs_MiSTer-videos/ || exit 1
|
|
cp -r docs ../ || exit 1
|
|
- name: Setup Python runtime
|
|
uses: actions/setup-python@v3
|
|
with:
|
|
python-version: ${{ env.PYTHON_VERSION }}
|
|
- name: Cache Python dependencies
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: ~/.cache/pip
|
|
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-pip-
|
|
- name: Install Python Dependencies
|
|
run: |
|
|
pip install -r requirements.txt
|
|
- name: Deploy Documentation
|
|
run: |
|
|
mkdocs gh-deploy --force
|
|
mkdocs --version
|