Skip to content

fix pull_request_target (#295) #7

fix pull_request_target (#295)

fix pull_request_target (#295) #7

Workflow file for this run

name: Deploy Documentation
on:
push:
branches:
- main
pull_request:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Set up python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install dependencies
run: |
set -e
pip install -r requirements.txt
pip install -r docs/requirements.txt
cp -r docs/assets docs/zh
cp -r docs/assets docs/en
python docs/add_docstrings.py
python docs/gen_mkdocs_yaml.py
- name: Start MkDocs server
id: start_server
run: |
mkdocs serve -a localhost:1369 > mkdocs.log 2>&1 &
- name: Wait for server to start
run: sleep 100
- name: Check if MkDocs server is running
run: |
if ! curl --silent --fail http://localhost:1369; then
echo "MkDocs server failed to start. Here's the log:"
cat mkdocs.log
exit 1
fi