diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..2398ce9 --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,31 @@ +name: Documentation + +on: + release: + types: + - created + +jobs: + job: + name: Documentation + runs-on: ubuntu-latest + env: + PACKAGE_NAME: n_const + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-python@v2 + with: + python-version: 3.8 + - name: Install dependencies + run: | + pip3 install poetry + poetry install + - name: Build docs + run: | + poetry run sphinx-apidoc -efTM -t docs/_templates/apidoc -o docs/_source ${{ env.PACKAGE_NAME }} + poetry run sphinx-build -a docs docs/_build + - name: Deploy docs + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: docs/_build diff --git a/pyproject.toml b/pyproject.toml index 4ea890b..30c7e02 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -5,7 +5,7 @@ description = "Parse and declare NANTEN2/NASCO specific constants/parameters." license = "MIT" readme = "README.md" authors = ["KaoruNishikawa "] -homepage = "https://github.com/nanten2/N-CONST" +homepage = "https://nanten2.github.io/N-CONST" repository = "https://github.com/nanten2/N-CONST" [tool.poetry.dependencies]