Skip to content

Fix README.md, extend backend README.md (#65) #47

Fix README.md, extend backend README.md (#65)

Fix README.md, extend backend README.md (#65) #47

Workflow file for this run

name: Deploy static content to Pages
on:
push:
branches: ["dev"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.5.1
### BEGIN BACKEND ###
- name: Build Backend API Docs
working-directory: backend
run: cargo doc --document-private-items --no-deps
- name: Fix permissions
working-directory: backend
run: |
chmod -c -R +rX "target/doc/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Copy Backend API Docs into the docs dir
working-directory: backend
run: |
mv target/doc target/backend
cp -r target/backend ../docs
### END BACKEND ###
### BEGIN NLP ###
- name: Install NLP dependencies
working-directory: nlp
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Setup sphinx
working-directory: nlp
run: |
mkdir src/docs && cd src/docs
sphinx-quickstart -q --no-sep -p nlp -a RMoods -r 0.1.0 -l en --ext-autodoc --ext-todo --ext-viewcode
sed -i "s|#*html_theme = '.*'|html_theme = 'sphinx_rtd_theme'|g" conf.py
sed -i "1i \import os\nimport sys\nsys.path.insert(0, os.path.abspath('..'))" conf.py
cd ..
sphinx-apidoc -o docs .
cd docs
sed -i "/:caption: Contents:/a\\\n modules" index.rst
- name: Make the sphinx docs
working-directory: nlp/src/docs
run: |
make clean
make html
- name: Copy NLP documentation to docs directory
working-directory: nlp
run: cp -r src/docs/_build/html ../docs/nlp
### END NLP ###
### BEGIN FRONTEND ###
- name: Build Frontend API Docs
working-directory: frontend
run: npm ci && npm run build-docs
- name: Copy Frontend API Docs into the docs dir
working-directory: frontend
run: cp -r ./docs/ ../docs/frontend
### END FRONTEND ###
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
name: github-pages
path: './docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4