diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index f719c81c..194d3c65 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -3,7 +3,6 @@ name: Deploy static content to Pages on: push: branches: ["main", "luc/test31"] - workflow_dispatch: permissions: @@ -16,20 +15,15 @@ concurrency: cancel-in-progress: true jobs: - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} + build-docs: runs-on: ubuntu-latest steps: - name: Checkout uses: actions/checkout@v3 - name: Setup Graphviz uses: ts-graphviz/setup-graphviz@v1 - - name: Setup Pages - uses: actions/configure-pages@v2 - - uses: pdm-project/setup-pdm@v3 - name: Setup PDM + - name: Setup PDM + uses: pdm-project/setup-pdm@v3 with: python-version: 3.10.0 architecture: x64 @@ -42,20 +36,29 @@ jobs: run: pdm install --plugins && pdm install -d -G ci && pdm torch install cpu - name: Build docs run: cd docs && make deploy + - name: Upload artifact + uses: actions/upload-artifact@v2 + with: + name: doc-build + path: 'docs/_build/dirhtml' - deploy-and-upload: + deploy: + needs: build-docs + if: github.ref == 'refs/heads/main' environment: name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest steps: - - name: Upload artifact - if: github.ref == 'refs/heads/main' - uses: actions/upload-pages-artifact@v1 + - name: Checkout + uses: actions/checkout@v3 + - name: Download artifact + uses: actions/download-artifact@v2 with: - # Upload entire repository + name: doc-build path: 'docs/_build/dirhtml' + - name: Setup Pages + uses: actions/configure-pages@v2 - name: Deploy to GitHub Pages - if: github.ref == 'refs/heads/main' id: deployment uses: actions/deploy-pages@v1