Skip to content

Commit 931cd22

Browse files
committed
Create wiki/website for TORCH
1 parent 285229c commit 931cd22

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+7506
-306
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,17 @@ name: Build
22

33
on:
44
push:
5+
paths-ignore:
6+
- 'docs/**'
57
branches:
68
- main
7-
- develop
89
tags:
910
- 'v*.*.*'
1011
pull_request:
1112
branches:
1213
- main
13-
- develop
14+
paths-ignore:
15+
- 'docs/**'
1416
schedule:
1517
- cron: '0 1 * * *'
1618
merge_group:

.github/workflows/docs.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Docs
2+
3+
on:
4+
push:
5+
paths:
6+
- 'docs/**'
7+
branches:
8+
- main
9+
tags:
10+
- 'v*.*.*'
11+
pull_request:
12+
paths:
13+
- 'docs/**'
14+
branches:
15+
- main
16+
schedule:
17+
- cron: '0 1 * * *'
18+
merge_group:
19+
20+
concurrency:
21+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.ref || github.run_id }}
22+
cancel-in-progress: true
23+
24+
permissions: read-all
25+
26+
jobs:
27+
build-pages:
28+
runs-on: ubuntu-24.04
29+
steps:
30+
- name: Check out Git repository
31+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
32+
33+
- name: Setup Node
34+
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
35+
with:
36+
node-version-file: .nvmrc
37+
cache: npm
38+
cache-dependency-path: 'docs/package-lock.json'
39+
40+
- name: Build
41+
working-directory: docs
42+
env:
43+
DOCS_BASE: "/${{ github.event.repository.name }}/"
44+
run: make build
45+
46+
- name: Setup Pages
47+
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5
48+
49+
- name: Upload artifact
50+
uses: actions/upload-pages-artifact@56afc609e74202658d3ffba0e8f6dda462b719fa # v3
51+
with:
52+
path: docs/.vitepress/dist
53+
54+
deploy-pages:
55+
runs-on: ubuntu-24.04
56+
needs: [ build-pages ]
57+
permissions:
58+
pages: write
59+
id-token: write
60+
environment:
61+
name: ${{ github.ref == 'refs/heads/main' && 'github-pages' || format('preview-{0}', github.ref_name) }}
62+
url: ${{ steps.deployment.outputs.page_url }}
63+
steps:
64+
- name: Deploy to GitHub Pages
65+
id: deployment
66+
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4
67+

.nvmrc

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

0 commit comments

Comments
 (0)