Skip to content

Commit 88b6fda

Browse files
committed
feature: add new website
1 parent d65cc5f commit 88b6fda

37 files changed

Lines changed: 639 additions & 0 deletions

.github/workflows/docs.yml

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
name: docs_pages_workflow
2+
3+
on: [pull_request]
4+
5+
permissions:
6+
pull-requests: write
7+
8+
jobs:
9+
build_docs_job:
10+
runs-on: ubuntu-latest
11+
env:
12+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v3
16+
17+
- name: Set up Python
18+
uses: actions/setup-python@v3
19+
with:
20+
python-version: 3.8
21+
22+
- name: Get pip cache dir
23+
id: pip-cache
24+
run: |
25+
python -m pip install --upgrade pip
26+
echo "dir={$(pip cache dir)}" >> $GITHUB_OUTPUT
27+
28+
- name: pip cache
29+
uses: actions/cache@v3
30+
with:
31+
path: ${{ steps.pip-cache.outputs.dir }}
32+
key: ${{ runner.os }}-pip-${{ hashFiles('**/setup.py', '**/requirements.txt', '**/docs/requirements.txt') }}
33+
restore-keys: |
34+
${{ runner.os }}-pip-
35+
36+
- name: Install docs requirements
37+
run: |
38+
python -m pip install -r docs/requirements.txt
39+
40+
- name: make the sphinx docs
41+
run: |
42+
make -C docs clean
43+
make -C docs html
44+
45+
- uses: readthedocs/actions/preview@v1
46+
with:
47+
project-slug: "trlx"
48+
project-language: "en"
49+
# see: https://github.com/readthedocs/actions/tree/main/preview
50+
# message-template (optional): Text message to be injected by the action in the Pull Request description. It supports the following placeholders to be replaced:
51+
# {docs-pr-index-url}: URL to the root of the documentation for the Pull Request preview.
52+
# platform (optional): Read the Docs Community (community) or Read the Docs for Business (business). (default: community)
53+
# single-version (optional): Set this to 'true' if your project is single version, so we can link to the correct URL. (default: 'false')

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Change log
2+
3+
Best viewed on [trlx.readthedocs.io](https://trlx.readthedocs.io/en/latest/changelog.html).
4+
5+
<!--
6+
Remember to align the itemized text with the first line of an item within a list.
7+
-->
8+
9+
## trlx 0.4.0 (2022-12-05)
10+
11+
- python 3.8

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
gendoc:
2+
docker build -t trlxgendocs -f docker/docs/Dockerfile .
3+
run:
4+
docker run --rm -it -v ${PWD}:/build \
5+
--entrypoint /bin/bash \
6+
trlxgendocs

dictionary.txt

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

docker/docs/Dockerfile

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM python:3.8-slim
2+
3+
# pip install -r docs/requirements.txt
4+
# sphinx-build -b html docs docs/build/html -j auto
5+
# sphinx-build -b html -D nb_execution_mode=off docs docs/build/html -j auto
6+
7+
RUN python -m pip install --upgrade --no-cache-dir pip
8+
ADD docs/requirements.txt /tmp/requirements.txt
9+
RUN python -m pip install --exists-action=w --no-cache-dir -r /tmp/requirements.txt
10+
RUN mkdir /build
11+
WORKDIR /build/docs/
12+
ENTRYPOINT /build/docs/build.sh
13+
# RUN `which sphinx-build` -T -E -b html -d _build/doctrees-readthedocs -D language=en . _build/html

docs/README.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# How To build the documentation
2+
3+
```bash
4+
make -c docs html
5+
```
3.96 KB
Loading
4.18 KB
Loading
5.3 KB
Loading
5.57 KB
Loading

0 commit comments

Comments
 (0)