-
Notifications
You must be signed in to change notification settings - Fork 273
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Metaworld documentation website (#438)
Co-authored-by: Reggie <[email protected]>
- Loading branch information
1 parent
15f269b
commit d155d00
Showing
17 changed files
with
818 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
name: Build and Deploy Docs | ||
on: | ||
push: | ||
branches: [master] | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
docs: | ||
name: Generate Website | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: '3.9' | ||
|
||
- name: Install docs dependencies | ||
run: pip install -r docs/requirements.txt | ||
|
||
- name: Install Metaworld | ||
run: pip install . | ||
|
||
- name: Build | ||
run: sphinx-build -b dirhtml -v docs _build | ||
|
||
- name: Move 404 | ||
run: mv _build/404/index.html _build/404.html | ||
|
||
- name: Update 404 links | ||
run: python docs/_scripts/move_404.py _build/404.html | ||
|
||
- name: Remove .doctrees | ||
run: rm -r _build/.doctrees | ||
|
||
- name: Upload to GitHub Pages | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
folder: _build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.DS_Store | ||
__pycache__ | ||
.vscode/ | ||
build/ | ||
_build/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
hide-toc: true | ||
--- | ||
|
||
# 404 - Page Not Found | ||
|
||
## The requested page could not be found. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# Minimal makefile for Sphinx documentation | ||
# | ||
|
||
# You can set these variables from the command line, and also | ||
# from the environment for the first two. | ||
SPHINXOPTS ?= | ||
SPHINXBUILD ?= sphinx-build | ||
SOURCEDIR = . | ||
BUILDDIR = _build | ||
|
||
# Put it first so that "make" without argument is like "make help". | ||
help: | ||
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
|
||
.PHONY: help Makefile | ||
|
||
# Catch-all target: route all unknown targets to Sphinx using the new | ||
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
%: Makefile | ||
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Metaworld documentation | ||
|
||
This directory contains the documentation for Metaworld. | ||
|
||
For more information about how to contribute to the documentation go to our [CONTRIBUTING.md](https://github.com/Farama-Foundation/Celshast/blob/main/CONTRIBUTING.md) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import sys | ||
|
||
if __name__ == "__main__": | ||
if len(sys.argv) < 2: | ||
print("Provide a path") | ||
filePath = sys.argv[1] | ||
|
||
with open(filePath, "r+") as fp: | ||
content = fp.read() | ||
content = content.replace('href="../', 'href="/').replace('src="../', 'src="/') | ||
fp.seek(0) | ||
fp.truncate() | ||
|
||
fp.write(content) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.