-
Notifications
You must be signed in to change notification settings - Fork 16
39 lines (37 loc) · 1.04 KB
/
github-pages.yml
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
name: GitHub Pages
on:
workflow_dispatch: {}
push:
branches: ['main']
tags: ['*']
jobs:
upload-docs:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
env:
DOCS_DIR: 'docs/'
OUTPUT_DIR: '_site/'
MAIN_BRANCH: 'main'
steps:
- name: Configure pages
uses: actions/configure-pages@v5
id: configure-pages
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ env.MAIN_BRANCH }}
fetch-depth: 0 # checkout a non-shallow copy so the generator can generate docs for all major versions
- uses: gopxl/docs@main
with:
site-url: ${{ steps.configure-pages.outputs.base_url }}
docs-directory: ${{ env.DOCS_DIR }}
output-directory: ${{ env.OUTPUT_DIR }}
main-branch: ${{ env.MAIN_BRANCH }}
- name: Upload pages
uses: actions/upload-pages-artifact@v3
with:
path: ${{ env.OUTPUT_DIR }}
- name: Deploy pages
uses: actions/deploy-pages@v4