-
Notifications
You must be signed in to change notification settings - Fork 71
149 lines (126 loc) · 5.44 KB
/
documentation.yaml
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
name: Documentation
on:
push:
branches:
- master
- main
env:
CPM_SOURCE_CACHE: ${{ github.workspace }}/cpm_modules
jobs:
build:
name: Build and publish documentation
runs-on: ubuntu-latest
steps:
- run: git config --global --add safe.directory '*'
- uses: actions/checkout@v3
with:
# need for git operations
fetch-depth: 0
lfs: false
submodules: true
- uses: actions/cache@v2
with:
path: |
"**/cpm_modules"
"/tmp/cache/awesome-gamedev-resources"
key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake', '/tmp/cache/awesome-gamedev-resources/*.json' ) }}
- name: APT Update
run: sudo apt update
- name: chrome
run: |
sudo apt install -y software-properties-common
sudo add-apt-repository -y ppa:saiarcot895/chromium-beta
sudo apt update
sudo apt install -y chromium-browser chromium-chromedriver
chromium-browser --no-sandbox --headless --disable-gpu --dump-dom https://google.com
sudo apt install -y ca-certificates fonts-liberation libappindicator3-1 libasound2 libatk-bridge2.0-0 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgbm1 libgcc1 libglib2.0-0 libgtk-3-0 libnspr4 libnss3 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 lsb-release wget xdg-utils unzip gnupg2
# - uses: browser-actions/setup-chrome@v1
# with:
# version: 'latest'
# - uses: nanasess/setup-chromedriver@v2
- name: Install dependencies
run: |
sudo apt-get install -y doxygen gource libgs-dev pngquant libcairo2-dev libfreetype6-dev libffi-dev libjpeg-dev libpng-dev libz-dev
- name: install mkdocs deps
run: |
pip install jinja2 Pygments mkdocs mkdocs-same-dir mkdocs-minify-plugin mkdocs-redirects mkdocs-exclude mkdocs-git-committers-plugin-2 mkdocs-git-revision-date-localized-plugin mkdocs-with-pdf beautifulsoup4==4.9.3 cairosvg pillow mkdocs-rss-plugin mkdocs-timetoread-plugin tzdata lxml mkdocs-glightbox mkdocs-revealjs mkdocs-charts-plugin mkdocs-git-authors-plugin
npm install
- name: install squidfunk mkdocs material
run: |
if [ "${{ secrets.GH_SQUID_TOKEN }}" != '' ]; then
pip install git+https://${{ secrets.GH_SQUID_TOKEN }}@github.com/squidfunk/mkdocs-material-insiders.git
else
pip install mkdocs-material
fi
# - name: Configure
# run: cmake -S. -Bbuild -DENABLE_TEST_COVERAGE=OFF -DENABLE_STANDALONE=ON -DENABLE_DOCUMENTATION=ON
# - name: Build Docs
# run: cmake --build build --target GenerateDocs
#
# - name: Build Emscripten
# run: cmake --build build -j4 --config Release
- name: mkdocs
run: CI=1 mkdocs build
- name: COPY CNAME
run: cp CNAME ./site
- run: cp ./robots.txt ./site/
- name: 'Gource Action'
uses: nbprojekt/gource-action@v1
with:
gource_title: 'Awesome Gamedev Resources'
# logo_url: 'overrides/favicon/android-chrome-192x192.png'
gource_resolution: '1080p'
gource_fps: 60
avatars_url: contributors
# avatars_auto_fetch: true
gource_seconds_per_day: 0.1
gource_hide_items: mouse
- run: cp ./gource/gource.mp4 ./site/gource.mp4
# - name: Copy Emscripten build to docs
# run: cp -R build/out/* build/documentation/doxygen/html/
- name: Publish
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site
force_orphan: true
- name: Semantic Release
id: semantic
uses: cycjimmy/semantic-release-action@v2
with:
semantic_version: 19.0.2
# You can specify specifying version range for the extra plugins if you prefer.
extra_plugins: |
@semantic-release/[email protected]
@semantic-release/[email protected]
@semantic-release/[email protected]
@semantic-release/[email protected]
@semantic-release/[email protected]
@semantic-release/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Version
id: version
run: |
if [[ ${{ steps.semantic.outputs.new_release_published }} == true ]]
then
export version=v${{ steps.semantic.outputs.new_release_version }}
else
export version=`git describe --abbrev=0 --tags $tag`
fi
echo "version=${version}" >> $GITHUB_OUTPUT
# - name: Latest pdf
# uses: ncipollo/release-action@v1
# if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' #|| startsWith(github.ref, 'refs/tags')
# with:
# allowUpdates: true
# artifacts: site/pdf/document.pdf
# tag: latest
#
# - name: Versined pdf
# uses: ncipollo/release-action@v1
# if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' #|| startsWith(github.ref, 'refs/tags')
# with:
# allowUpdates: true
# artifacts: site/pdf/document.pdf
# tag: ${{ steps.version.outputs.version }}