-
Notifications
You must be signed in to change notification settings - Fork 413
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
Upgrade Website #2653
base: main
Are you sure you want to change the base?
Upgrade Website #2653
Changes from all commits
13c99fc
c0ec5ea
cfef395
eb47ddf
2e94b7c
c66ba2d
a3695c7
e02a54a
9c989f3
923f83f
f5c1d32
8f9d043
b2e1c94
4f0c73c
8ce96e4
1ef37ac
70046fc
2e68102
f2f0272
45dc6f3
dc5fcf8
256c53f
5853455
f332c11
44e1772
218a384
a0b3eaa
d56ab0b
5118c53
f16dd2c
bb22e7f
9ae213d
39208d0
a7ef982
73b8490
02495f2
0c1085b
601f0dd
aa49f07
f6e6bdb
ee3122c
1d71aa9
19ad36c
53829fb
2efca40
e7201c7
a1d86f2
4868d63
5400b57
ee3c241
467af1f
5cf3fce
f63a8e9
d408683
2f9d682
b176947
7dad122
980868b
4abb608
1eea559
3cf5588
256b054
fcfe591
b313a4f
bd51a6d
30900bf
7e9b6c8
1b6fb63
b83e090
2a7f62a
f32b83b
0808bda
50d9508
6a0c27d
9fc8103
538b207
846b3b4
8ccbf33
09b459d
60a95e0
a92fb74
f13759a
4768614
7226170
25e09dd
020412d
8f84d61
5a5d432
3e6d0b6
99196eb
787c28d
659379c
48f3757
47a42f2
9f818ef
eff8c03
39fd6c4
9315052
66dbf58
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Publish Website | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
new_version: | ||
required: false | ||
type: string | ||
run_tutorials: | ||
required: false | ||
type: boolean | ||
default: false | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
|
||
build-website: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: 'docusaurus-versions' # release branch | ||
fetch-depth: 0 | ||
- name: Sync release branch with main | ||
run: | | ||
git config --global user.name "github-actions[bot]" | ||
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
git merge origin/main | ||
# To avoid a large number of commits we don't push this sync commit to github until a new release. | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.12" | ||
- if: ${{ !inputs.new_version }} | ||
name: Install latest GPyTorch and Linear Operator | ||
run: | | ||
pip install git+https://github.com/cornellius-gp/linear_operator.git | ||
pip install git+https://github.com/cornellius-gp/gpytorch.git | ||
- name: Install dependencies | ||
env: | ||
ALLOW_LATEST_GPYTORCH_LINOP: true | ||
ALLOW_BOTORCH_LATEST: true # Allow Ax to install w/ new BoTorch release. | ||
run: | | ||
pip install ."[dev, tutorials]" | ||
# There may not be a compatible Ax pip version, so we use the development version. | ||
pip install git+https://github.com/facebook/Ax.git | ||
- if: ${{ inputs.new_version }} | ||
name: Create new docusaurus version | ||
run: | | ||
python3 scripts/convert_ipynb_to_mdx.py --clean | ||
cd website | ||
yarn | ||
yarn docusaurus docs:version ${{ inputs.new_version }} | ||
|
||
git add --all | ||
git commit -m "Create version ${{ inputs.new_version }} of site in Docusaurus" | ||
git push --force origin HEAD:docusaurus-versions | ||
- name: Build website | ||
run: | | ||
bash scripts/build_docs.sh -b | ||
- name: Upload website build as artifact | ||
id: deployment | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: website/build/ | ||
|
||
deploy-website: | ||
needs: build-website | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
version: "2" | ||
|
||
build: | ||
os: "ubuntu-22.04" | ||
tools: | ||
python: "3.12" | ||
jobs: | ||
post_install: | ||
# Install latest botorch if not on a released version | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should we set There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sait had the same question 🙂 answered here: #2653 (comment) The gist is that readthedocs does not have a way for us to programmatically set an env variable to be consumed by the install step in their CI. My solution here was to install pinned deps first then conditionally install the latest versions as a |
||
- | | ||
tag=$(eval "git name-rev --name-only --tags HEAD") | ||
if [ $tag = "undefined" ]; then | ||
pip install git+https://github.com/cornellius-gp/linear_operator.git | ||
pip install git+https://github.com/cornellius-gp/gpytorch.git | ||
fi | ||
|
||
python: | ||
install: | ||
- method: pip | ||
path: . | ||
extra_requirements: | ||
- dev | ||
saitcakmak marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
sphinx: | ||
configuration: sphinx/source/conf.py |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When would that not be the case? This workflow is executed upon creating a GitHub release, so this should involve updating at least the minor version? Or is the idea that there may be some post-release update bugfix or the like?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is also the patch versions. v.. The idea is to not release website for the patch versions (primarily for Ax, since we'll follow semver there after 1.0), since these are not intended to include any new features, but only minimal bug / documentation fixes.