Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Start working on fixing image paths #1635

Merged
merged 10 commits into from
Jul 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion .github/workflows/build_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
- name: Update docs
run: |
mkdir -p ooni-docs/src/content/docs/probe-engine/
mkdir -p ooni-docs/src/assets/images-probe-engine/
cp -R dist/docs/img/* ooni-docs/src/assets/images-probe-engine/
rm -r dist/docs/img
cp -R dist/docs/* ooni-docs/src/content/docs/probe-engine/

- name: Check for conflicting slugs
Expand All @@ -36,6 +39,9 @@ jobs:
- name: Print the lines of the generated docs
run: wc -l ooni-docs/src/content/docs/probe-engine/*

- name: Print assets used in docs
run: ls ooni-docs/src/assets

- name: Commit changes
# Only push the docs update when we are in master
if: github.ref == 'refs/heads/master'
Expand All @@ -44,5 +50,5 @@ jobs:
git config --global user.email "github+backend@ooni.org"
git config --global user.name "OONI Github Actions Bot"
git add .
git commit -m "auto: update backend docs to ${{ steps.rev_parse.outputs.COMMIT_HASH }}" || echo "No changes to commit"
git commit -m "auto: update probe-engine docs to ${{ steps.rev_parse.outputs.COMMIT_HASH }}" || echo "No changes to commit"
git push origin
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,4 @@
/probe-cli.cov
/tinyjafar
/tmp-*
/dist
11 changes: 9 additions & 2 deletions script/build_docs.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#!/bin/bash
set +ex
DOCS_ROOT=dist/docs/
REPO_NAME="ooni/probe-cli"
COMMIT_HASH=$(git rev-parse --short HEAD)
Expand All @@ -22,7 +23,10 @@ description: OONI Probe Engine documentation
slug: probe-engine
---
EOF
strip_title README.md >> $DOCS_ROOT/00-index.md
strip_title Readme.md >> $DOCS_ROOT/00-index.md
mkdir -p $DOCS_ROOT/img
cp docs/logo.png $DOCS_ROOT/img/
sed -i 's+docs/logo.png+../../../assets/images-probe-engine/logo.png+' $DOCS_ROOT/00-index.md

# design docs
BASE_PATH=docs/design
Expand Down Expand Up @@ -64,7 +68,7 @@ description: OONI netx package design documentation
slug: probe-engine/design/netx
---
EOF
strip_title $BASE_PATH/dd-02-netx.md >> $DOC_PATH
strip_title $BASE_PATH/dd-002-netx.md >> $DOC_PATH

DOC_PATH=$DOCS_ROOT/03-design-step-by-step.md
cat <<EOF>$DOC_PATH
Expand All @@ -78,6 +82,9 @@ slug: probe-engine/design/step-by-step
---
EOF
strip_title $BASE_PATH/dd-003-step-by-step.md >> $DOC_PATH
cp -R $BASE_PATH/img/* $DOCS_ROOT/img/
sed -i 's+img/git-probe-cli-netx-deps.png+../../../assets/images-probe-engine/git-probe-cli-netx-deps.png+' $DOC_PATH
sed -i 's+img/git-probe-cli-change-histogram.png+../../../assets/images-probe-engine/git-probe-cli-change-histogram.png+' $DOC_PATH

DOC_PATH=$DOCS_ROOT/04-design-minioonirunv2.md
cat <<EOF>$DOC_PATH
Expand Down
Loading