Skip to content

Commit

Permalink
Merge pull request #7 from NREL/gb/gh_workflows
Browse files Browse the repository at this point in the history
added workflows
  • Loading branch information
grantbuster authored Nov 3, 2023
2 parents 086b122 + c717aa1 commit 2fc7241
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/gh_pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Documentation

on:
push:
branches: [main]
workflow_dispatch:

jobs:
make-pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: select python version
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .
python -m pip install sphinx
python -m pip install sphinx_rtd_theme
python -m pip install sphinx-click
- name: build documentation
run: |
cd docs
make html
- name: deploy
uses: peaceiris/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/_build/html
force_orphan: true
full_commit_message: ${{ github.event.head_commit.message }}
26 changes: 26 additions & 0 deletions .github/workflows/publish_to_pypi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Upload to PyPi

on:
release:
types: [published]
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
# IMPORTANT: this permission is mandatory for trusted publishing
id-token: write
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies and Build
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
python setup.py sdist bdist_wheel
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
14 changes: 14 additions & 0 deletions .github/workflows/release_drafter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Release Drafter

on:
push:
branches: [master, main]

jobs:
update_release_draft:
runs-on: ubuntu-latest
steps:
- name: Release Drafter
uses: release-drafter/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 2fc7241

Please sign in to comment.