forked from backstage/mkdocs-monorepo-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (71 loc) · 2.21 KB
/
deploy.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Build, Test & Deploy
on:
push:
branches:
- master
paths:
- ".github/workflows/deploy.yml"
- "setup.py"
jobs:
test:
name: Test on Python ${{ matrix.python-version }}
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3", "3.7", "3.8", "3.9", "3.10", "3.11"]
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python-version: ${{ matrix.python-version }}
- name: Install Bats
run: ./__tests__/setup-bats.sh
- name: Install Python dependencies
run: ./__tests__/setup-pip.sh
- name: Tests
run: ./__tests__/test-ci.sh
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python-version: 3.7
- name: Install Python dependencies
run: ./__tests__/setup-pip.sh
- name: Build Docs
run: |
mkdocs build --theme material
- name: Install Plugin
run: pip install -e .
- name: Build Example Docs
working-directory: "sample-docs/"
run: |
mkdocs build --theme material \
--site-dir ../site/monorepo-example/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@8fd3a55a6f17e453f71eb37964ff360eee24daa7
env:
ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
PUBLISH_BRANCH: gh-pages
PUBLISH_DIR: ./site
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@master
with:
python-version: 3.7
- name: Build Python distribution
run: |
pip install wheel
rm -rf dist
python setup.py bdist_wheel sdist --formats gztar
- name: Publish a Python distribution to PyPI
uses: pypa/gh-action-pypi-publish@f3ebf87ba2883f1c40faf37d2bb42277f12179c8
with:
user: __token__
password: ${{ secrets.pypi_api_key }}