Skip to content

Commit

Permalink
Merge pull request #104 from cmccandless/deploy-gha
Browse files Browse the repository at this point in the history
Replace Travis with GHA
  • Loading branch information
cmccandless committed Nov 30, 2020
2 parents 146ae55 + 4db6f7d commit 57dff3b
Show file tree
Hide file tree
Showing 4 changed files with 75 additions and 21 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/deploy-to-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Deploy to Pages

on:
push:
branches: [master, main]
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: 3.8

- name: Build
run: python generate.py

- name: Push to gh-pages
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "no-reply@github.com"
git add index.md
git commit -m 'Deploy to gh-pages'
git checkout -b gh-pages
git push origin gh-pages:gh-pages
23 changes: 23 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: CI / Lint

on:
push:
branches: [master, main]
pull_request:
workflow_dispatch:

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: 3.8

- run: pip check

- run: pip install flake8

- run: flake8 *.py
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI / Test

on:
push:
branches: [master, main]
pull_request:
workflow_dispatch:

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-python@v2
with:
python-version: 3.8

- run: pip install -r requirements.txt

- name: Install certificates for SSL verification
run: pip install -U requests[security]

- run: pytest -v
21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

0 comments on commit 57dff3b

Please sign in to comment.