diff --git a/.github/workflows/github-pages.yaml b/.github/workflows/github-pages.yaml index 760e9102..8ea807e3 100644 --- a/.github/workflows/github-pages.yaml +++ b/.github/workflows/github-pages.yaml @@ -5,6 +5,9 @@ on: branches: - main pull_request: {} + release: + types: + - published jobs: build: @@ -22,8 +25,9 @@ jobs: run: | python -m pip install -U pip pip install --progress-bar off . + pip install --progress-bar off PyGitHub + pip install --progress-bar off git+https://${SECRET_GITHUB_TOKEN}@github.com/optuna/optunahub.git pip install --progress-bar off ".[docs]" - pip install --progress-bar off git+https://github.com/optuna/optunahub.git - name: Build env: SECRET_GITHUB_TOKEN: ${{ secrets.SECRET_GITHUB_TOKEN }} diff --git a/pyproject.toml b/pyproject.toml index 81f33da4..317a0cc9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -25,7 +25,7 @@ docs = [ "sphinx-gallery", "matplotlib", "optuna", - "optunahub" + # "optunahub", ] [tool.setuptools.packages.find] diff --git a/recipes/001_first.py b/recipes/001_first.py index bee4fc7c..7a271e83 100644 --- a/recipes/001_first.py +++ b/recipes/001_first.py @@ -25,8 +25,10 @@ ################################################################################################### # First of all, import `optuna`, `optunahub`, and other necessary modules. +import os from typing import Any +from github import Auth import numpy as np import optuna import optunahub @@ -40,6 +42,7 @@ SimpleSampler = optunahub.load( "samplers/simple", + auth=Auth.Token(os.environ["SECRET_GITHUB_TOKEN"]), ).SimpleSampler