diff --git a/.github/workflows/deploy_doc.yml b/.github/workflows/deploy_doc.yml new file mode 100644 index 00000000..8a45a266 --- /dev/null +++ b/.github/workflows/deploy_doc.yml @@ -0,0 +1,46 @@ +name: Deploy Documentation + +on: + push: + branches: + - main + - lwj/deploy_doc + 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: | + pip install -r requirements.txt + pip install -r docs/requirements.txt + python docs/add_docstrings.py + + - name: Start MkDocs server + id: start_server + run: | + mkdocs serve -a localhost:1369 & + + - name: Wait for server to start + run: sleep 100 + + - name: Check if MkDocs server is running + run: | + curl --silent --fail http://localhost:1369 || (echo "MkDocs server failed to start" && exit 1) \ No newline at end of file