Skip to content

Commit 4e4c898

Browse files
committed
ai generated github workflow
1 parent ad87329 commit 4e4c898

File tree

1 file changed

+63
-0
lines changed

1 file changed

+63
-0
lines changed

.github/workflows/ci.yml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- '**'
7+
pull_request:
8+
branches:
9+
- '**'
10+
11+
jobs:
12+
test:
13+
if: github.ref != 'refs/heads/master'
14+
runs-on: ubuntu-latest
15+
container:
16+
image: python:3.8-buster
17+
steps:
18+
- name: Checkout code
19+
uses: actions/checkout@v3
20+
21+
- name: Set up Python
22+
uses: actions/setup-python@v4
23+
with:
24+
python-version: 3.8
25+
26+
- name: Install dependencies
27+
run: pip install -r requirements.txt
28+
29+
- name: Build MkDocs site for testing
30+
run: mkdocs build --strict --verbose --site-dir test
31+
32+
- name: Upload test artifacts
33+
if: always()
34+
uses: actions/upload-artifact@v3
35+
with:
36+
name: test
37+
path: test
38+
39+
deploy:
40+
if: github.ref == 'refs/heads/master'
41+
runs-on: ubuntu-latest
42+
container:
43+
image: python:3.8-buster
44+
steps:
45+
- name: Checkout code
46+
uses: actions/checkout@v3
47+
48+
- name: Set up Python
49+
uses: actions/setup-python@v4
50+
with:
51+
python-version: 3.8
52+
53+
- name: Install dependencies
54+
run: pip install -r requirements.txt
55+
56+
- name: Build MkDocs site for deployment
57+
run: mkdocs build --strict --verbose
58+
59+
- name: Upload deployment artifacts
60+
uses: actions/upload-artifact@v3
61+
with:
62+
name: public
63+
path: public

0 commit comments

Comments
 (0)