This repository has been archived by the owner on Sep 18, 2024. It is now read-only.
Manual Docs Build #229
Workflow file for this run
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: Manual Docs Build | |
on: | |
workflow_dispatch: | |
inputs: | |
release_token: | |
description: 'Your release token' | |
required: true | |
triggered_by: | |
description: 'CD | TAG | MANUAL' | |
required: false | |
default: MANUAL | |
jobs: | |
token-check: | |
runs-on: ubuntu-latest | |
steps: | |
- run: echo "success!" | |
if: "${{ github.event.inputs.release_token }} == ${{ env.release_token }}" | |
env: | |
release_token: ${{ secrets.FINETUNER_RELEASE_TOKEN }} | |
release-docs: | |
needs: token-check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-python@v2 | |
with: | |
python-version: 3.8 | |
- name: Build doc and push to gh-pages | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "Jina Dev Bot" | |
pip install . | |
mkdir gen-html | |
cd docs | |
pip install -r requirements.txt | |
pip install -U furo | |
export NUM_RELEASES=5 | |
bash makedoc.sh local-only | |
make notebook | |
cd ./build/dirhtml/ | |
cp -r ./ ../../../gen-html | |
cd - # back to ./docs | |
cd .. | |
git checkout -f gh-pages | |
git rm -rf ./docs | |
mkdir -p docs | |
cd gen-html | |
cp -r ./ ../docs | |
cd ../docs | |
ls -la | |
touch .nojekyll | |
cp 404/index.html 404.html | |
sed -i 's/href="\.\./href="/' 404.html # fix asset urls that needs to be updated in 404.html | |
echo finetuner.jina.ai > CNAME | |
cd .. | |
git status | |
git add docs && git commit -m "chore(docs): update docs due to ${{github.event_name}} on ${{github.repository}}" | |
git push --force origin gh-pages |