Merge pull request #46 from PolicyEngine/major-bump #28
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Push | |
on: | |
push: | |
branches: [ main ] | |
jobs: | |
Lint: | |
runs-on: ubuntu-latest | |
if: | | |
(github.repository == 'PolicyEngine/policyengine-us') | |
&& (github.event.head_commit.message == 'Update PolicyEngine US') | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Check formatting | |
uses: "lgeiger/black-action@master" | |
with: | |
args: ". -l 79 --check" | |
Publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
with: | |
python-version: 3.12 | |
- name: Publish a git tag | |
run: ".github/publish-git-tag.sh || true" | |
- name: Install package | |
run: make install | |
- name: Build package | |
run: make | |
- name: Publish a Python distribution to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
user: __token__ | |
password: ${{ secrets.PYPI }} | |
skip-existing: true | |
Deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v2 | |
- name: Setup Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: 3.9 | |
- name: install dependencies | |
run: | | |
pip install jupyter-book | |
pip install furo | |
pip install sphinx-argparse | |
- name: Generate documentation | |
run: make documentation | |
- name: Deploy documentation | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: docs/_build/html |