Skip to content

Commit

Permalink
Merge pull request #1 from optuna/work-documentation-ci-with-github-s…
Browse files Browse the repository at this point in the history
…ecret

Make documentation CI work with github secret until release
  • Loading branch information
HideakiImamura authored May 14, 2024
2 parents ebb67e1 + 30fdb8f commit 1f771d2
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
6 changes: 5 additions & 1 deletion .github/workflows/github-pages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ on:
branches:
- main
pull_request: {}
release:
types:
- published

jobs:
build:
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ docs = [
"sphinx-gallery",
"matplotlib",
"optuna",
"optunahub"
# "optunahub",
]

[tool.setuptools.packages.find]
Expand Down
3 changes: 3 additions & 0 deletions recipes/001_first.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -40,6 +42,7 @@

SimpleSampler = optunahub.load(
"samplers/simple",
auth=Auth.Token(os.environ["SECRET_GITHUB_TOKEN"]),
).SimpleSampler


Expand Down

0 comments on commit 1f771d2

Please sign in to comment.