Skip to content

Commit 3766daa

Browse files
authored
Add Docusaurus website (#65)
1 parent 5b11451 commit 3766daa

36 files changed

+21990
-2
lines changed

.github/workflows/docs.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,15 @@ on:
88
- 'docs/**'
99
- 'torchts/**'
1010
- 'poetry.lock'
11+
- 'website/**'
12+
pull_request:
13+
branches:
14+
- main
15+
paths:
16+
- 'docs/**'
17+
- 'torchts/**'
18+
- 'poetry.lock'
19+
- 'website/**'
1120

1221
jobs:
1322
build:
@@ -21,6 +30,11 @@ jobs:
2130
- name: Set up Python
2231
uses: actions/[email protected]
2332

33+
- name: Set up Node
34+
uses: actions/setup-node@v2
35+
with:
36+
node-version: "14"
37+
2438
- name: Get Python version
2539
id: python-version
2640
run: echo ::set-output name=version::$(python -c "import sys; print('-'.join(str(v) for v in sys.version_info))")
@@ -45,22 +59,29 @@ jobs:
4559
- name: Build documentation
4660
run: poetry run make -C docs html
4761

62+
- name: Build Docusaurus website
63+
run: |
64+
cd website
65+
npm install
66+
npm run build
67+
4868
- name: Generate token
69+
if: success() && github.event_name == 'push'
4970
id: generate-token
5071
uses: tibdex/[email protected]
5172
with:
5273
app_id: ${{ secrets.APP_ID }}
5374
private_key: ${{ secrets.APP_PRIVATE_KEY }}
5475

5576
- name: Deploy documentation
56-
if: success()
77+
if: success() && github.event_name == 'push'
5778
uses: JamesIves/[email protected]
5879
with:
5980
token: ${{ steps.generate-token.outputs.token }}
6081
git-config-name: torchts-bot[bot]
6182
git-config-email: 88511308+torchts-bot[bot]@users.noreply.github.com
6283
branch: gh-pages
63-
folder: docs/build/html
84+
folder: website/build
6485
clean: true
6586
clean-exclude: |
6687
README.md

website/.gitignore

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Dependencies
2+
/node_modules
3+
4+
# Production
5+
/build
6+
7+
# Generated files
8+
.docusaurus
9+
.cache-loader
10+
11+
# Misc
12+
.DS_Store
13+
.env.local
14+
.env.development.local
15+
.env.test.local
16+
.env.production.local
17+
18+
npm-debug.log*
19+
yarn-debug.log*
20+
yarn-error.log*

website/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Website
2+
3+
This website is built using [Docusaurus 2](https://docusaurus.io/), a modern static website generator.
4+
5+
## Installation
6+
7+
```console
8+
yarn install
9+
```
10+
11+
## Local Development
12+
13+
```console
14+
yarn start
15+
```
16+
17+
This command starts a local development server and opens up a browser window. Most changes are reflected live without having to restart the server.
18+
19+
## Build
20+
21+
```console
22+
yarn build
23+
```
24+
25+
This command generates static content into the `build` directory and can be served using any static contents hosting service.
26+
27+
## Deployment
28+
29+
```console
30+
GIT_USER=<Your GitHub username> USE_SSH=true yarn deploy
31+
```
32+
33+
If you are using GitHub pages for hosting, this command is a convenient way to build the website and push to the `gh-pages` branch.

website/babel.config.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
presets: [require.resolve('@docusaurus/core/lib/babel/preset')],
3+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"label": "Classic Time Series Models",
3+
"position": 2
4+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: Autoregressive Model (AR)
3+
slug: /autoregressive
4+
---
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: Vector Autoregressive Model (VAR)
3+
slug: /vector
4+
---
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: Seq2Seq with GRU
3+
slug: /seq2seq-GRU
4+
---
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
---
2+
title: Seq2Seq with LSTM
3+
slug: /seq2seq-lstm
4+
---
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"label": "Deep Sequence to Sequence Models",
3+
"position": 3
4+
}

0 commit comments

Comments
 (0)