From 9f39885f92dce380d50a0f6dc4eb3979b921786d Mon Sep 17 00:00:00 2001 From: Amir Mardan <46511946+AmirMardan@users.noreply.github.com> Date: Wed, 27 Mar 2024 20:07:41 -0400 Subject: [PATCH] update with custom --- .github/workflows/static.yml | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml index e78baf9..562c033 100644 --- a/.github/workflows/static.yml +++ b/.github/workflows/static.yml @@ -23,39 +23,45 @@ concurrency: jobs: # Single deploy job since we're just deploying - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + build_docs_job: runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: - name: Checkout uses: actions/checkout@v4 - - name: Setup Pages - uses: actions/configure-pages@v4 + + - name: Set up Python + uses: actions/setup-python@v2.2.1 + with: + python-version: 3.9 + - name: Install dependencies run: | python -m pip install -U sphinx nbsphinx recommonmark python -m pip install sphinx-rtd-theme + - name: make the sphinx docs run: | make -C docs clean make -C docs html + - name: Init new repo in dist folder and commit run: | - cd docs/_build/html/ + cd docs/build/html/ git init touch .nojekyll git add -A git config --local user.email "action@github.com" git config --local user.name "GitHub Action" git commit -m 'deploy' - git config --global --add safe.directory /github/workspace/docs/_build/html + - name: Force push to destination branch uses: ad-m/github-push-action@v0.5.0 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - branch: gh-pages - force: true - directory: ./docs/_build/html - + github_token: ${{ secrets.GITHUB_TOKEN }} + branch: gh-pages + force: true + directory: ./docs/_build/html +