Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make documentation CI work with github secret until release #1

Merged
merged 1 commit into from
May 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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