1
0
mirror of https://github.com/juanfont/headscale.git synced 2024-12-20 19:09:07 +01:00
juanfont.headscale/.github/workflows/docs.yml

53 lines
1.1 KiB
YAML
Raw Normal View History

2023-03-27 20:37:25 +02:00
name: Build documentation
2024-03-13 13:43:06 +01:00
2023-03-27 20:37:25 +02:00
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
2024-03-13 13:43:06 +01:00
uses: actions/checkout@v4
2023-03-27 20:37:25 +02:00
- name: Install python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Setup cache
uses: actions/cache@v2
with:
key: ${{ github.ref }}
path: .cache
- name: Setup dependencies
run: pip install -r docs/requirements.txt
2023-03-27 20:37:25 +02:00
- name: Build docs
2023-04-01 21:23:48 +02:00
run: mkdocs build --strict
2023-03-27 20:37:25 +02:00
- name: Upload artifact
2024-03-22 19:50:35 +01:00
uses: actions/upload-pages-artifact@v3
2023-03-27 20:37:25 +02:00
with:
path: ./site
2024-03-13 13:43:06 +01:00
2023-03-27 20:37:25 +02:00
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
2024-03-22 19:50:35 +01:00
permissions:
pages: write
id-token: write
2023-03-27 20:37:25 +02:00
runs-on: ubuntu-latest
needs: build
steps:
2024-03-22 19:50:35 +01:00
- name: Configure Pages
uses: actions/configure-pages@v4
2023-03-27 20:37:25 +02:00
- name: Deploy to GitHub Pages
id: deployment
2024-03-13 13:43:06 +01:00
uses: actions/deploy-pages@v4