mybuddy/.github/workflows/ci.yml

76 lines
2.2 KiB
YAML
Raw Normal View History

name: CI
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
2023-03-18 17:07:46 +00:00
python-version: [ '3.7', '3.8', '3.9', '3.10', '3.11' ]
steps:
- uses: actions/checkout@v3
2022-06-03 04:34:04 +00:00
- uses: ./.github/actions/setup
with:
python-version: ${{ matrix.python-version }}
2022-06-11 02:47:40 +00:00
- run: npm install --location=global gulp-cli
- run: npm install
- run: gulp lint
- run: gulp coverage
- name: Submit results to Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
github-token: ${{ secrets.github_token }}
flag-name: test-python-${{ matrix.python-version }}
parallel: true
2022-06-03 03:54:48 +00:00
coveralls-finish:
needs: test
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
uses: AndreMiras/coveralls-python-action@develop
with:
github-token: ${{ secrets.github_token }}
parallel-finished: true
2022-05-28 20:13:38 +00:00
deploy-docs:
needs: test
2022-05-28 20:13:38 +00:00
runs-on: ubuntu-latest
environment:
name: documentation
url: https://docs.baby-buddy.net
2022-05-28 20:13:38 +00:00
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
steps:
2022-06-03 03:54:48 +00:00
- uses: actions/checkout@v3
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v34
with:
files: |
docs/**
2022-05-28 20:13:38 +00:00
- name: Deploy docs
if: steps.changed-files.outputs.any_changed == 'true'
2022-05-28 20:13:38 +00:00
uses: mhausenblas/mkdocs-deploy-gh-pages@master
env:
GITHUB_TOKEN: ${{ secrets.github_token }}
2022-05-28 20:27:36 +00:00
REQUIREMENTS: docs/requirements.txt
2022-10-30 02:19:04 +00:00
deploy-demo:
needs: test
runs-on: ubuntu-latest
2022-10-30 17:22:18 +00:00
environment:
name: demo
url: https://demo.baby-buddy.net
2022-10-30 02:19:04 +00:00
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Push to dokku
uses: dokku/github-action@master
with:
2022-11-03 03:57:45 +00:00
git_remote_url: 'ssh://dokku@dokku.baby-buddy.net:22/demo'
2022-10-30 02:19:04 +00:00
ssh_private_key: ${{ secrets.DOKKU_SSH_PRIVATE_KEY }}