Skip to content

Commit fb781e3

Browse files
authored
Add GH Action for Deployment
GH Action that: - build the docs to HTML - uploads the HTML to GH pages
1 parent 98db2c5 commit fb781e3

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/mkdocs.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy our mkdocs site to Pages
2+
3+
on:
4+
# Runs on pushes targeting the default branch
5+
push:
6+
branches: ["main"]
7+
8+
# Allows you to run this workflow manually from the Actions tab
9+
workflow_dispatch:
10+
11+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
12+
permissions:
13+
contents: read
14+
pages: write
15+
id-token: write
16+
17+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
18+
# Does also cancel in-progress runs, if someone pushes a new update quickly.
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: true
22+
23+
jobs:
24+
# Build job
25+
build:
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v4
29+
- uses: conda-incubator/setup-miniconda@v3
30+
with:
31+
activate-environment: 10tev-docs
32+
environment-file: environment.yml
33+
auto-activate-base: false
34+
- name: Setup Pages
35+
id: pages
36+
uses: actions/configure-pages@v5
37+
- name: Build with mkdocs
38+
run: mkdocs build
39+
- name: Upload artifact
40+
uses: actions/upload-pages-artifact@v3
41+
42+
# Deployment job
43+
deploy:
44+
environment:
45+
name: github-pages
46+
url: ${{ steps.deployment.outputs.page_url }}
47+
runs-on: ubuntu-latest
48+
needs: build
49+
steps:
50+
- name: Deploy to GitHub Pages
51+
id: deployment
52+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)