Skip to content

Commit 9be8eb8

Browse files
committed
Adding Github Actions
1 parent 975c33f commit 9be8eb8

1 file changed

Lines changed: 53 additions & 0 deletions

File tree

.github/workflows/ci.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: Deploy MkDocs site to GitHub Pages
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v3
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.x'
20+
21+
- name: Install dependencies
22+
run: |
23+
pip install mkdocs mkdocs-material
24+
25+
- name: Build MkDocs site
26+
run: |
27+
mkdocs build
28+
29+
- name: Setup Pages
30+
uses: actions/configure-pages@v3
31+
32+
- name: Upload artifact
33+
uses: actions/upload-pages-artifact@v1
34+
with:
35+
path: ./site
36+
37+
deploy:
38+
if: github.ref == 'refs/heads/main'
39+
runs-on: ubuntu-latest
40+
needs: build
41+
42+
permissions:
43+
pages: write
44+
id-token: write
45+
46+
environment:
47+
name: github-pages
48+
url: ${{ steps.deployment.outputs.page_url }}
49+
50+
steps:
51+
- name: Deploy to GitHub Pages
52+
id: deployment
53+
uses: actions/deploy-pages@v2

0 commit comments

Comments
 (0)