Merge pull request #4 from thanhndv212/release/v0.3.0 #30
This file contains hidden or 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: Build and Deploy Docs | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| # These permissions are needed for deployment | |
| permissions: | |
| contents: write | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| # Remove environment specification to avoid protection rules | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v3 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.x' | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y pkg-config coinor-libipopt-dev libblas-dev liblapack-dev | |
| python -m pip install --upgrade pip | |
| pip install sphinx sphinx-rtd-theme | |
| pip install -e . | |
| - name: Build Documentation | |
| run: | | |
| cd docs | |
| make html | |
| touch build/html/.nojekyll | |
| - name: Deploy to GitHub Pages | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| branch: gh-pages | |
| folder: docs/build/html | |
| clean: true | |
| force: true |