Skip to content

Commit 07236fd

Browse files
Merge pull request #9 from pytorch-labs/updated_deployment
[graph-break-website] updated workflow deployment to generate into pytorch doc
2 parents 693e8f4 + 7cc4803 commit 07236fd

File tree

2 files changed

+59
-1
lines changed

2 files changed

+59
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Deploy Graph Break Site
2+
3+
on:
4+
push:
5+
branches:
6+
- main # Adjust if your primary branch is named differently (e.g., master)
7+
schedule:
8+
- cron: '0 0 * * *' # Run daily at midnight UTC
9+
10+
jobs:
11+
build-and-deploy:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout compile-graph-break-site
16+
uses: actions/checkout@v3
17+
with:
18+
repository: pytorch-labs/compile-graph-break-site
19+
path: compile-graph-break-site
20+
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: '18' # Use a Node.js version compatible with your project
25+
26+
- name: Install dependencies
27+
run: npm install
28+
working-directory: compile-graph-break-site
29+
30+
- name: Build site
31+
run: npm run build
32+
working-directory: compile-graph-break-site
33+
34+
- name: Checkout pytorch/docs repository
35+
uses: actions/checkout@v3
36+
with:
37+
repository: pytorch/docs
38+
ref: site # The target branch in the pytorch/docs repo
39+
token: ${{ secrets.DOCS_REPO_TOKEN }} # Personal Access Token with repo scope
40+
path: pytorch-docs
41+
42+
- name: Prepare deployment directory
43+
run: |
44+
mkdir -p pytorch-docs/docs/repo/compile-graph-break
45+
rsync -av --delete compile-graph-break-site/gbid_directory/ pytorch-docs/docs/repo/compile-graph-break/
46+
working-directory: ${{ github.workspace }}
47+
48+
- name: Commit and Push
49+
uses: stefanzweifel/git-auto-commit-action@v4
50+
with:
51+
repository: pytorch/docs
52+
branch: site
53+
commit_message: "Deploy: Update compile-graph-break site"
54+
file_pattern: 'docs/repo/compile-graph-break/**'
55+
commit_options: '--no-verify --signoff'
56+
push_options: '--force'
57+
token: ${{ secrets.DOCS_REPO_TOKEN }}
58+
working_directory: pytorch-docs

generate-site.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ description: A registry of PyTorch Dynamo graph breaks.
3333
3434
# Base URL for the site
3535
# This is crucial for correct linking on GitHub Pages
36-
baseurl: "/compile-graph-break-site" # Adjust this based on your actual GitHub Pages path
36+
baseurl: "/docs/repo/compile-graph-break" # Adjust this based on your actual GitHub Pages path
3737
3838
# Build settings
3939
theme: jekyll-theme-minimal # Or any other Jekyll theme you prefer

0 commit comments

Comments
 (0)