Skip to content

Commit 3254c12

Browse files
committed
maintain update script in main branch
1 parent 102be1e commit 3254c12

File tree

3 files changed

+11
-1
lines changed

3 files changed

+11
-1
lines changed

.github/workflows/update.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,14 @@ jobs:
1111
build:
1212
runs-on: ubuntu-latest
1313
steps:
14-
- uses: actions/checkout@v4
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Checkout gh-pages
18+
uses: actions/checkout@v4
1519
with:
1620
ref: 'gh-pages'
21+
path: 'gh-pages'
1722

1823
- name: Update Reports
1924
run: ./update-pytorch.sh
@@ -22,6 +27,7 @@ jobs:
2227
env:
2328
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2429
run: |
30+
cd gh-pages
2531
git diff-index --quiet HEAD && exit 0 # commit only if something to do
2632
git config --local user.email "[email protected]"
2733
git config --local user.name "Update CI"

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
gh-pages/

update-pytorch.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
#!/bin/bash
22

3+
[ -d gh-pages ] || git clone -q --branch gh-pages $(git config --get remote.origin.url) gh-pages
4+
cd gh-pages
5+
36
# update a PyPI index from PyTorch = https://download.pytorch.org/$d with d=whl or whl/<compute platform>
47
# this copies the content (main url + follows links to projects) and does 2 updates:
58
# 1. copies the content in a "simple/" sub-directory to match the convention from PEP 503 simple (that allows other APIs in parallel)

0 commit comments

Comments
 (0)