Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 8 additions & 11 deletions .github/workflows/build-deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ on:
branches: [ main ]
tags:
- 'v[0-9]*.[0-9]*.[0-9]*'
pull_request:
types: [opened, synchronize, reopened]

jobs:
Build_and_deploy_doc:
build-deploy-doc:
name: Build & deploy doc
environment: prod-documentation
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -33,21 +33,18 @@ jobs:
id: deploy_folder
run: |
echo "Determining deployment folder..."
if [ "${{ github.event_name }}" = "pull_request" ]; then
echo "Deploying to target pr/${{ github.event.number }}"
echo "DEPLOY_DIR=pr/${{ github.event.number }}" >> $GITHUB_OUTPUT
elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
echo "Deploying to target ${{ github.ref_name }}"
echo "DEPLOY_DIR=${{ github.ref_name }}" >> $GITHUB_OUTPUT
else
echo "Deploying to target main"
echo "DEPLOY_DIR=main" >> $GITHUB_OUTPUT
echo "Deploying to target latest"
echo "DEPLOY_DIR=latest" >> $GITHUB_OUTPUT
fi

- name: Deploy to DEPLOY_DIR of TorchJD/documentation
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.DOCUMENTATION_DEPLOY_KEY }}
deploy_key: ${{ secrets.PROD_DOCUMENTATION_DEPLOY_KEY }}
publish_dir: docs/build/dirhtml
destination_dir: ${{ steps.deploy_folder.outputs.DEPLOY_DIR }}
external_repository: TorchJD/documentation
Expand All @@ -57,7 +54,7 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.DOCUMENTATION_DEPLOY_KEY }}
deploy_key: ${{ secrets.PROD_DOCUMENTATION_DEPLOY_KEY }}
publish_dir: docs/build/dirhtml
destination_dir: stable
external_repository: TorchJD/documentation
Expand Down
32 changes: 0 additions & 32 deletions .github/workflows/cleanup-pr-docs.yml

This file was deleted.

12 changes: 1 addition & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@ with maintainers before implementing major changes.
pdm run pytest tests/unit tests/doc --cov=src
```

## Building the documentation

### Locally

## Building the documentation locally
- From the `docs` folder, run:
```bash
pdm run make html
Expand All @@ -62,13 +59,6 @@ with maintainers before implementing major changes.
pdm run make clean
```

### Online

- When you open a pull request, a GitHub action should build and deploy the documentation, which
will become available at `torchjd.org/pr/<pr_number>`. Additionally, you can click on the check
status of the action, then click on `Summary`, and then click on the link of the built
documentation.

## Development guidelines

The following guidelines should help preserve a good code quality in TorchJD. Contributions that do
Expand Down