Repository navigation
72 lines (62 loc) · 1.69 KB
/
Copy pathdocs-deploy.yml
File metadata and controls
72 lines (62 loc) · 1.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: Documentation Deployment
on:
workflow_call:
inputs:
python-version:
required: true
type: string
default: '3.12'
working-directory:
type: string
required: false
default: '.'
outputs:
url:
description: "URL of the deployed documentation"
value: ${{ jobs.deploy.outputs.url }}
jobs:
build:
name: Documentation
runs-on: ubuntu-latest
defaults:
run:
working-directory: ${{ inputs.working-directory }}
steps:
- uses: actions/checkout@v5
- name: Setup uv
uses: plone/meta/.github/actions/setup_uv@2.x
with:
python-version: ${{ inputs.python-version }}
working-directory: ${{ inputs.working-directory }}
- name: Install Dependencies
shell: bash
run: make install
- name: Build HTML documentation
shell: bash
run: |
make build
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: ${{ inputs.working-directory }}/_build/html/
deploy:
name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
outputs:
url: ${{ steps.deployment.outputs.page_url }}
needs:
- build
permissions:
pages: write
id-token: write
# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# Specify runner + deployment step
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4