Repository navigation
Autodoc #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Autodoc #39
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,58 @@ | ||
| name: docs | ||
|
|
||
| # Builds the Sphinx HTML docs on every PR/push touching them (as a check), | ||
| # and publishes to GitHub Pages on pushes to main. | ||
| # One-time setup: Settings -> Pages -> Source: "GitHub Actions". | ||
|
|
||
| on: | ||
| push: | ||
| branches: [autodoc, main] | ||
| paths: ["docs/**", "clpipe/**", ".github/workflows/docs.yml"] | ||
| pull_request: | ||
| paths: ["docs/**", "clpipe/**", ".github/workflows/docs.yml"] | ||
| workflow_dispatch: | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: pages-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: "3.12" | ||
| cache: pip | ||
| cache-dependency-path: docs/requirements.txt | ||
|
|
||
| - name: Install doc dependencies | ||
| run: pip install -r docs/requirements.txt | ||
|
|
||
| - name: Build HTML docs | ||
| working-directory: docs | ||
| run: make html | ||
|
|
||
| - name: Upload artifact (for inspection and Pages) | ||
| uses: actions/upload-pages-artifact@v3 | ||
| with: | ||
| path: docs/_build/html | ||
|
|
||
| deploy: | ||
| needs: build | ||
| if: github.event_name != 'pull_request' && (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/autodoc') | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Here, you can choose when the publication of the document is triggered.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this could be triggered inside a PR once it is marked READY FOR REVIEW. Also we can add another condition for the deploy which is: it has to eb ready for review and we trigger a button in the github actions, so it is not done all the time:
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is fine for now, once this doc mechanism will be valided we will remove the autodoc banch
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Lets just not forget to go back to main for publishing the docs before merging this PR |
||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| pages: write | ||
| id-token: write | ||
| environment: | ||
| name: github-pages | ||
| url: ${{ steps.deployment.outputs.page_url }} | ||
| steps: | ||
| - id: deployment | ||
| uses: actions/deploy-pages@v4 | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have to change this to be only main later? Or any PR once ready for review?