Skip to content

Commit c6a4b23

Browse files
Daniils Petrovsaxelson
andauthored
Fix docsite publish (#636)
* Add initial mkdocs docsite * Add guide on mkdocs website dev * Add Mkdocs website deployment stages * Temp: build docsite on PR * Publish the docsite when tags are pushed Co-authored-by: Jason Axelson <[email protected]>
1 parent e37d142 commit c6a4b23

File tree

2 files changed

+46
-18
lines changed

2 files changed

+46
-18
lines changed

.github/workflows/docsite.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Build and Publish docsite
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
jobs:
9+
build:
10+
name: Build Mkdocs website
11+
runs-on: ubuntu-latest
12+
strategy:
13+
max-parallel: 1
14+
container:
15+
image: squidfunk/mkdocs-material
16+
steps:
17+
- name: Checkout
18+
uses: actions/[email protected]
19+
- name: Build
20+
run: mkdocs build -s
21+
- name: Upload artifact
22+
uses: actions/upload-artifact@v1
23+
with:
24+
name: site
25+
path: site
26+
27+
publish:
28+
needs: build
29+
name: Publish Mkdocs website to GH Pages
30+
runs-on: ubuntu-latest
31+
strategy:
32+
max-parallel: 1
33+
steps:
34+
- name: Checkout
35+
uses: actions/[email protected]
36+
- name: Download artifact
37+
uses: actions/download-artifact@v1
38+
with:
39+
name: site
40+
path: site
41+
- name: Publish
42+
uses: peaceiris/actions-gh-pages@v3
43+
with:
44+
publish_branch: mkdocs
45+
publish_dir: site
46+
github_token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release-asset.yml

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -88,21 +88,3 @@ jobs:
8888
asset_name: elixir-ls.zip
8989
asset_content_type: application/zip
9090

91-
build-docsite:
92-
name: Build Mkdocs website
93-
runs-on: ubuntu-latest
94-
container:
95-
image: squidfunk/mkdocs-material
96-
steps:
97-
- name: Build
98-
run: mkdocs build -s
99-
100-
publish-docsite:
101-
name: Publish Mkdocs website to GH Pages
102-
runs-on: ubuntu-latest
103-
steps:
104-
- name: Publish
105-
uses: JamesIves/[email protected]
106-
with:
107-
branch: mkdocs
108-
folder: site

0 commit comments

Comments
 (0)