Updated readme (#351) #102
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
name: Deploy Docs | |
on: | |
push: | |
branches: | |
- main | |
permissions: | |
contents: write | |
jobs: | |
docs: | |
name: Generate Website | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.4.0 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.9" | |
cache: "poetry" | |
- name: Install dependencies | |
run: poetry lock && poetry install --extras docs | |
- name: Build | |
run: poetry run sphinx-build docs/source docs/build | |
- name: Add model table | |
run: | | |
poetry run python -m transformer_lens.make_docs | |
mv model_properties_table.md docs/source/ | |
sed -i '1s/^/# Model Properties Table\n\n/' docs/source/model_properties_table.md | |
- name: Remove .doctrees | |
run: rm -r docs/build/.doctrees | |
- name: Upload to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: docs/build | |
clean-exclude: | | |
*.*.*/ |