Skip to content

Commit 1266976

Browse files
Merge pull request #389 from smokestacklightnin/ci/docs/add-mkdocs
Use mkdocs for documentation
2 parents c7b5885 + 8d2e218 commit 1266976

36 files changed

+5087
-4568
lines changed

.github/workflows/docs.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Deploy docs
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- 'master'
7+
pull_request:
8+
permissions:
9+
contents: write
10+
jobs:
11+
deploy:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout repo
15+
uses: actions/checkout@v4
16+
17+
- name: Configure Git Credentials
18+
run: |
19+
git config user.name github-actions[bot]
20+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
21+
if: (github.event_name != 'pull_request')
22+
23+
- name: Set up Python 3.9
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: '3.9'
27+
cache: 'pip'
28+
cache-dependency-path: |
29+
setup.py
30+
requirements-docs.txt
31+
32+
- name: Save time for cache for mkdocs
33+
run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
34+
35+
- name: Caching
36+
uses: actions/cache@v4
37+
with:
38+
key: mkdocs-material-${{ env.cache_id }}
39+
path: .cache
40+
restore-keys: |
41+
mkdocs-material-
42+
43+
- name: Install Dependencies
44+
run: pip install -r requirements-docs.txt
45+
46+
- name: Deploy to GitHub Pages
47+
run: mkdocs gh-deploy --force
48+
if: (github.event_name != 'pull_request')
49+
50+
- name: Build docs to check for errors
51+
run: mkdocs build
52+
if: (github.event_name == 'pull_request')
File renamed without changes.
File renamed without changes.
File renamed without changes.

g3doc/guide/guidance.md renamed to docs/guide/guidance.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ sociolinguists, and cultural anthropologists, as well as with members of the
2121
populations on which technology will be deployed.
2222

2323
A single model, for example, the toxicity model that we leverage in the
24-
[example colab](https://www.tensorflow.org/responsible_ai/fairness_indicators/tutorials/Fairness_Indicators_Example_Colab),
24+
[example colab](../../tutorials/Fairness_Indicators_Example_Colab),
2525
can be used in many different contexts. A toxicity model deployed on a website
2626
to filter offensive comments, for example, is a very different use case than the
2727
model being deployed in an example web UI where users can type in a sentence and
@@ -315,7 +315,7 @@ Prediction Flip Count** *
315315
**Don’t see the metrics you’re looking for?**
316316

317317
Follow the documentation
318-
[here](https://github.com/tensorflow/model-analysis/blob/master/g3doc/post_export_metrics.md)
318+
[here](https://tensorflow.github.io/model-analysis/post_export_metrics/)
319319
to add you own custom metric.
320320

321321
## Final notes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)