Skip to content

Commit

Permalink
Merge pull request #507 from yukinarit/publish-docs
Browse files Browse the repository at this point in the history
  • Loading branch information
yukinarit authored Mar 31, 2024
2 parents 7918a98 + eec73c5 commit b44c3f6
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 55 deletions.
54 changes: 0 additions & 54 deletions .github/workflows/build.yml

This file was deleted.

46 changes: 45 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ on:

jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand All @@ -25,3 +24,48 @@ jobs:
- name: Publish to PyPI
run: |
poetry publish --build -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}
release-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
persist-credentials: false
- name: Install poetry
run: pip install poetry
- name: Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: poetry
cache-dependency-path: pyproject.toml
- name: Install dependencies
run: |
poetry install
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
source $HOME/.cargo/env
cargo install mdbook
- name: Get PR number
uses: jwalton/gh-find-current-pr@v1
id: findPr
with:
state: all
- name: Set commit message
run: |
if [ -z "$PR" ]
then
echo "COMMIT_MESSAGE=:octocat: Update docs" >> $GITHUB_ENV
else
echo "COMMIT_MESSAGE=:octocat: Update docs for #$PR" >> $GITHUB_ENV
fi
env:
PR: ${{ steps.findPr.outputs.pr }}
- name: Build docs
run: make docs
- name: Deploy on gh-pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: out
commit-message: ${{ env.COMMIT_MESSAGE }}
clean: true
git-config-name: github-actions
git-config-email: [email protected]

0 comments on commit b44c3f6

Please sign in to comment.