Skip to content

Commit

Permalink
switch to new documentation folder
Browse files Browse the repository at this point in the history
  • Loading branch information
zhengp0 committed Sep 3, 2024
1 parent de033c7 commit de3c4e9
Show file tree
Hide file tree
Showing 65 changed files with 135 additions and 10,707 deletions.
34 changes: 15 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,25 @@
name: build
on: [push]

on:
push:
branches:
- "*"

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up Python 3.11
uses: actions/setup-python@v2
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.11"
python-version: "3.12"
- name: Install dependencies
run: python -m pip install .[test] --upgrade pip
- name: Test with pytest
run: pytest
- name: Build package distribution
if: startsWith(github.ref, 'refs/tags')
run: |
python -m pip install build
python -m build --sdist --wheel --outdir dist/ .
- name: Publish package distribution to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@master
run: pytest --cov=./ --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
skip_existing: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
token: ${{ secrets.CODECOV_TOKEN }}
slug: ihmeuw-msca/msca
59 changes: 59 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: deploy

on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"

permissions:
contents: write

jobs:
pypi:
if: false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: python -m pip install build . --upgrade pip
- name: Build package distribution
run: python -m build --sdist --wheel --outdir dist/ .
- name: Publish package distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip_existing: true
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

docs:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install dependencies
run: python -m pip install .[docs] --upgrade pip
- name: Generate API docs & Build sphinx documentation
run: |
git fetch --tags
cd docs
python build.py
cd ..
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './docs/pages'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
4 changes: 0 additions & 4 deletions docs/.buildinfo

This file was deleted.

Empty file removed docs/.nojekyll
Empty file.
2 changes: 1 addition & 1 deletion sphinx/Makefile → docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ ghpage:
@make html
@cp -a $(BUILDDIR)/html/. $(BUILDDIR)
@rm -rf $(BUILDDIR)/doctrees $(BUILDDIR)/html
@touch $(BUILDDIR)/.nojekyll
@touch $(BUILDDIR)/.nojekyll
260 changes: 0 additions & 260 deletions docs/_modules/index.html

This file was deleted.

Loading

0 comments on commit de3c4e9

Please sign in to comment.