Skip to content

Commit 3554572

Browse files
authored
Merge pull request #27 from Bernardo-MG/ci_scripts
Ci scripts
2 parents 227b9f5 + 1c9c8ef commit 3554572

4 files changed

Lines changed: 40 additions & 94 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -6,26 +6,9 @@ on:
66
- master
77

88
jobs:
9-
deploy_docs:
10-
11-
runs-on: ubuntu-latest
12-
13-
steps:
14-
- name: Check-out
15-
uses: actions/checkout@v2
16-
- name: Set up Python
17-
uses: actions/setup-python@v2
18-
with:
19-
python-version: 3.9
20-
- name: Install dependencies
21-
run: |
22-
python -m pip install --upgrade pip
23-
pip install flake8 pytest
24-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
25-
- name: Build distribution
26-
run: python setup.py sdist bdist_wheel
27-
- name: Deploy
28-
run: twine upload -r pypi dist/*
29-
env:
30-
TWINE_USERNAME: ${{ secrets.DEPLOY_USER }}
31-
TWINE_PASSWORD: ${{ secrets.DEPLOY_PASSWORD }}
9+
pypi:
10+
name: Pypi
11+
uses: Bernardo-MG/github-workflow/.github/workflows/python_deploy_pypi.yml@v1
12+
secrets:
13+
username: ${{ secrets.DEPLOY_USER }}
14+
password: ${{ secrets.DEPLOY_PASSWORD }}

.github/workflows/deploy_docs.yml

Lines changed: 0 additions & 45 deletions
This file was deleted.

.github/workflows/testing.yml

Lines changed: 28 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,34 @@
1-
name: Testing and validation
1+
name: Tests and docs
22

33
on: [push, pull_request]
44

55
jobs:
6-
test:
6+
tests:
7+
name: Tests
8+
uses: Bernardo-MG/github-workflow/.github/workflows/python_testing.yml@develop
79

8-
runs-on: ubuntu-latest
9-
strategy:
10-
matrix:
11-
python-version: [3.6, 3.7, 3.8, 3.9]
10+
deploy_develop_docs:
11+
name: Deploy development docs
12+
needs: tests
13+
uses: Bernardo-MG/github-workflow/.github/workflows/python_deploy_site.yml@develop
14+
with:
15+
branch: develop
16+
host: docs.bernardomg.com
17+
secrets:
18+
port: ${{ secrets.DEPLOY_DOCS_DEVELOP_PORT }}
19+
path: ${{ secrets.DEPLOY_DOCS_DEVELOP_PATH }}
20+
username: ${{ secrets.DEPLOY_DOCS_DEVELOP_USER }}
21+
password: ${{ secrets.DEPLOY_DOCS_DEVELOP_PASSWORD }}
1222

13-
steps:
14-
- name: Check-out
15-
uses: actions/checkout@v2
16-
- name: Set up Python ${{ matrix.python-version }}
17-
uses: actions/setup-python@v2
18-
with:
19-
python-version: ${{ matrix.python-version }}
20-
- name: Install dependencies
21-
run: |
22-
python -m pip install --upgrade pip
23-
pip install flake8 pytest
24-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
25-
- name: Run all tests
26-
run: python setup.py test -p py${{ matrix.python-version }}
23+
deploy_docs:
24+
name: Deploy docs
25+
needs: tests
26+
uses: Bernardo-MG/github-workflow/.github/workflows/python_deploy_site.yml@develop
27+
with:
28+
branch: master
29+
host: docs.bernardomg.com
30+
secrets:
31+
port: ${{ secrets.DEPLOY_DOCS_PORT }}
32+
path: ${{ secrets.DEPLOY_DOCS_PATH }}
33+
username: ${{ secrets.DEPLOY_DOCS_USER }}
34+
password: ${{ secrets.DEPLOY_DOCS_PASSWORD }}

README.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,10 +19,10 @@ operating with it on any Python application.
1919
:alt: Dice Notation Tools for Python Pypi package page
2020

2121
.. image:: https://img.shields.io/badge/docs-release-blue.svg
22-
:target: http://docs.bernardomg.com/dice-notation-python
22+
:target: https://docs.bernardomg.com/dice-notation-python
2323
:alt: Dice Notation Tools for Python latest documentation
2424
.. image:: https://img.shields.io/badge/docs-develop-blue.svg
25-
:target: http://docs.bernardomg.com/development/dice-notation-python
25+
:target: https://docs.bernardomg.com/development/dice-notation-python
2626
:alt: Dice Notation Tools for Python development documentation
2727

2828
Features
@@ -146,9 +146,9 @@ License
146146
The project has been released under the `MIT License`_.
147147

148148
.. _GitHub project page: https://github.com/Bernardo-MG/dice-notation-python
149-
.. _latest docs: http://docs.bernardomg.com/dice-notation-python
150-
.. _development docs: http://docs.bernardomg.com/development/dice-notation-python
149+
.. _latest docs: https://docs.bernardomg.com/dice-notation-python
150+
.. _development docs: https://docs.bernardomg.com/development/dice-notation-python
151151
.. _Pypi package: https://pypi.python.org/pypi/dice-notation
152-
.. _MIT License: http://www.opensource.org/licenses/mit-license.php
152+
.. _MIT License: https://opensource.org/licenses/mit-license.php
153153
.. _project issues tracker: https://github.com/Bernardo-MG/dice-notation-python/issues
154-
.. _Sphinx: http://sphinx-doc.org/
154+
.. _Sphinx: https://www.sphinx-doc.org

0 commit comments

Comments
 (0)