Skip to content

Commit d55bd2c

Browse files
Create docfx-pages.yaml
1 parent 20cbeb4 commit d55bd2c

File tree

1 file changed

+113
-0
lines changed

1 file changed

+113
-0
lines changed

.github/workflows/docfx-pages.yaml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: docfx for GitHub Pages
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches:
7+
- 'main'
8+
#- 'releases/**'
9+
pull_request:
10+
branches:
11+
- 'main'
12+
13+
# Allows you to run this workflow manually from the Actions tab
14+
workflow_dispatch:
15+
16+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
17+
permissions:
18+
contents: read
19+
pages: write
20+
id-token: write
21+
22+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
23+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
24+
concurrency:
25+
group: "pages"
26+
cancel-in-progress: false
27+
28+
jobs:
29+
# Single deploy job since we're just deploying
30+
deploy:
31+
environment:
32+
name: github-pages
33+
url: ${{ steps.deployment.outputs.page_url }}
34+
runs-on: ubuntu-latest
35+
36+
37+
#########################################
38+
###### sator-imaging/docfx-pages ######
39+
#########################################
40+
steps:
41+
42+
# for extensibility, docfx-pages does NOT checkout your repository.
43+
# so you need to checkout manually prior to sator-imaging/docfx-pages.
44+
- name: Checkout
45+
uses: actions/checkout@v3
46+
47+
48+
# after checkout, you can checkout another repo, copy logo image or
49+
# other assets into '.docfx' folder to setup own docfx environment.
50+
# note that images must be copied into '.docfx/images' folder.
51+
52+
53+
###### main ######
54+
55+
- uses: sator-imaging/docfx-pages@v1
56+
id: deployment # required to show url in actions result page.
57+
with:
58+
# required options - NOTE: double-quote (") cannot be used
59+
app_name: 'USG'
60+
site_title: 'Source Generator for Unity'
61+
site_footer: '© 2024 Sator Imaging'
62+
63+
# optional
64+
class_members: 'samePage' # 'separatePages' or 'samePage'
65+
google_analytics: '' # empty to disable
66+
67+
# paths must be relative from .docfx folder.
68+
# note that url works but only in top page. see sample website for detail.
69+
## site_logo: 'https://avatars.githubusercontent.com/u/16752340'
70+
## site_favicon: 'https://avatars.githubusercontent.com/u/45192683'
71+
72+
# advanced options
73+
# --> https://dotnet.github.io/docfx/docs/template.html?tabs=modern#custom-template
74+
# main.js
75+
# NOTE: double-quote (") cannot be used
76+
main_js: |
77+
export default {
78+
defaultTheme: 'light',
79+
showLightbox: (img) => true,
80+
iconLinks: [
81+
{
82+
icon: 'github',
83+
href: 'https://github.com/sator-imaging',
84+
title: 'GitHub'
85+
},
86+
{
87+
icon: 'twitter',
88+
href: 'https://twitter.com/sator_imaging',
89+
title: 'Twitter'
90+
},
91+
{
92+
icon: 'unity',
93+
href: 'https://prf.hn/l/0eoDOON',
94+
title: 'AssetStore'
95+
},
96+
{
97+
icon: 'youtube',
98+
href: 'https://www.youtube.com/@SatorImaging',
99+
title: 'YouTube'
100+
},
101+
{
102+
icon: 'chat-quote-fill',
103+
href: 'https://www.sator-imaging.com/',
104+
title: 'Contact'
105+
},
106+
],
107+
}
108+
109+
# main.css
110+
# NOTE: double-quote (") cannot be used
111+
main_css: |
112+
113+

0 commit comments

Comments
 (0)