Skip to content

Commit e15699d

Browse files
committed
Delete Circle CI config and add github action
1 parent 4392e8a commit e15699d

File tree

3 files changed

+65
-37
lines changed

3 files changed

+65
-37
lines changed

.circleci/config.yml.in

Lines changed: 0 additions & 33 deletions
This file was deleted.

.circleci/mock.env.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

.github/workflows/build-theme.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: Test Documentation Build
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
workflow-dispatch:
9+
10+
jobs:
11+
build-docs:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v3
15+
16+
- name: Set up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.10'
20+
21+
- name: Set up Node.js
22+
uses: actions/setup-node@v3
23+
with:
24+
node-version: '16'
25+
26+
- name: Install dependencies
27+
run: |
28+
python -m pip install --upgrade pip
29+
pip install -r docs/requirements.txt
30+
pip install -e .
31+
32+
- name: Build theme assets
33+
run: |
34+
npx grunt default
35+
36+
- name: Build Test documentation
37+
run: |
38+
cd docs
39+
sphinx-build -b html . _build/html
40+
41+
- name: Upload documentation artifact
42+
uses: actions/upload-artifact@v3
43+
with:
44+
name: documentation
45+
path: docs/_build/html/
46+
47+
doc-preview:
48+
runs-on: ubuntu-latest
49+
needs: build-docs
50+
if: ${{ github.event_name == 'pull_request' }}
51+
steps:
52+
- name: Download artifact
53+
uses: actions/download-artifact@v4
54+
with:
55+
name: documentation
56+
path: docs/_build/html
57+
58+
- name: Upload docs preview
59+
uses: seemethere/upload-artifact-s3@v5
60+
with:
61+
retention-days: 14
62+
s3-bucket: doc-previews
63+
if-no-files-found: error
64+
path: docs/_build/html
65+
s3-prefix: pytorch_sphinx_theme/${{ github.event.pull_request.number }

0 commit comments

Comments
 (0)