Skip to content

Commit 915fe6e

Browse files
committed
Update github action workflows
1 parent 22db926 commit 915fe6e

File tree

3 files changed

+76
-39
lines changed

3 files changed

+76
-39
lines changed

.github/workflows/deploy.yml

-34
This file was deleted.

.github/workflows/release.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags: [ 'v*' ]
6+
7+
env:
8+
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
9+
10+
jobs:
11+
test:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Set up Python 3.11
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: 3.11
20+
- name: Install dependencies
21+
id: install-deps
22+
run:
23+
python3 -m pip install --upgrade pip
24+
pip install -r requirements.txt
25+
# - name: nitpick
26+
# id: nitpick
27+
# run:
28+
# sphinx-build -b html -n . _build/html
29+
# - name: linkcheck
30+
# id: linkcheck
31+
# run:
32+
# sphinx-build -b linkcheck . _build/linkcheck
33+
# - name: spelling
34+
# id: spelling
35+
# run:
36+
# sphinx-build -b spelling . _build/spelling
37+
38+
release:
39+
name: Publish
40+
needs: test
41+
runs-on: ubuntu-latest
42+
43+
steps:
44+
- uses: actions/checkout@v3
45+
- name: Set up Python 3.11
46+
uses: actions/setup-python@v4
47+
with:
48+
python-version: 3.11
49+
- name: Install dependencies
50+
id: install-deps
51+
run:
52+
python3 -m pip install --upgrade pip
53+
pip install -r requirements.txt
54+
- name: Build HTML
55+
id: build
56+
run:
57+
sphinx-build -b html -d _build/doctrees . _build/html
58+
59+
- name: Publish to GitHub Pages
60+
id: publish
61+
uses: peaceiris/actions-gh-pages@v3
62+
with:
63+
github_token: ${{ secrets.GITHUB_TOKEN }}
64+
publish_dir: _build/html
65+
66+
- uses: act10ns/slack@v1
67+
with:
68+
status: ${{ job.status }}
69+
steps: ${{ toJson(steps) }}

.github/workflows/test.yml renamed to .github/workflows/tests.yml

+7-5
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
1-
name: Test
1+
name: Tests
22

33
on:
44
push:
5-
# tags:
6-
# - 'v*'
5+
pull_request:
6+
branches: [ master ]
77

88
env:
99
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
1010

1111
jobs:
1212
test:
1313
runs-on: ubuntu-latest
14+
1415
steps:
15-
- uses: actions/checkout@v2
16+
- uses: actions/checkout@v3
1617
- name: install
1718
run:
1819
pip install -r requirements.txt
@@ -31,8 +32,9 @@ jobs:
3132

3233
build:
3334
runs-on: ubuntu-latest
35+
3436
steps:
35-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v3
3638
- name: install
3739
run:
3840
pip install -r requirements.txt

0 commit comments

Comments
 (0)