docker-documentation/.github/workflows/deploy.yml

40 wiersze
1013 B
YAML
Czysty Zwykły widok Historia

2022-11-28 00:36:48 +00:00
name: Build mkdocs and deploy to GitHub Pages
2022-11-28 00:36:48 +00:00
on: [push, pull_request]
jobs:
2022-11-28 00:36:48 +00:00
build:
name: Build docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/setup-python@v4.7.1
2022-11-28 00:36:48 +00:00
with:
python-version: 3.x
- uses: actions/cache@v3.3.2
2022-11-28 00:36:48 +00:00
with:
key: ${{ github.ref }}
path: .cache
- run: pip install -r docs/requirements.txt
- run: mkdocs build
deploy:
if: github.event_name == 'push' && contains(fromJson('["refs/heads/master", "refs/heads/main"]'), github.ref)
2022-11-28 00:36:48 +00:00
needs: build
name: Deploy docs
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
2022-11-28 00:36:48 +00:00
with:
fetch-depth: '0'
- uses: actions/setup-python@v4.7.1
with:
python-version: 3.x
- uses: actions/cache@v3.3.2
2022-11-28 00:36:48 +00:00
with:
key: ${{ github.ref }}
path: .cache
- run: pip install -r docs/requirements.txt
2022-11-28 01:13:59 +00:00
- run: mkdocs gh-deploy --force