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
0 commit comments