Skip to content

Commit

Permalink
Update github action workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
satterly committed Mar 19, 2023
1 parent 22db926 commit 915fe6e
Show file tree
Hide file tree
Showing 3 changed files with 76 additions and 39 deletions.
34 changes: 0 additions & 34 deletions .github/workflows/deploy.yml

This file was deleted.

69 changes: 69 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Release

on:
push:
tags: [ 'v*' ]

env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
id: install-deps
run:
python3 -m pip install --upgrade pip
pip install -r requirements.txt
# - name: nitpick
# id: nitpick
# run:
# sphinx-build -b html -n . _build/html
# - name: linkcheck
# id: linkcheck
# run:
# sphinx-build -b linkcheck . _build/linkcheck
# - name: spelling
# id: spelling
# run:
# sphinx-build -b spelling . _build/spelling

release:
name: Publish
needs: test
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
id: install-deps
run:
python3 -m pip install --upgrade pip
pip install -r requirements.txt
- name: Build HTML
id: build
run:
sphinx-build -b html -d _build/doctrees . _build/html

- name: Publish to GitHub Pages
id: publish
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: _build/html

- uses: act10ns/slack@v1
with:
status: ${{ job.status }}
steps: ${{ toJson(steps) }}
12 changes: 7 additions & 5 deletions .github/workflows/test.yml → .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,19 @@
name: Test
name: Tests

on:
push:
# tags:
# - 'v*'
pull_request:
branches: [ master ]

env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

jobs:
test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: install
run:
pip install -r requirements.txt
Expand All @@ -31,8 +32,9 @@ jobs:

build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: install
run:
pip install -r requirements.txt
Expand Down

0 comments on commit 915fe6e

Please sign in to comment.