Skip to content

Commit 06291d4

Browse files
authored
Merge branch 'main' into make-utilitary-functions-public-autojac
2 parents 0a2db52 + 069cda6 commit 06291d4

3 files changed

Lines changed: 29 additions & 43 deletions

File tree

.github/workflows/build-deploy-docs.yml

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ on:
55
branches: [ main ]
66
tags:
77
- 'v[0-9]*.[0-9]*.[0-9]*'
8-
pull_request:
9-
types: [opened, synchronize, reopened]
108

119
jobs:
12-
Build_and_deploy_doc:
10+
build-deploy-doc:
11+
name: Build & deploy doc
12+
environment: prod-documentation
1313
runs-on: ubuntu-latest
1414
permissions:
1515
contents: write
@@ -33,21 +33,18 @@ jobs:
3333
id: deploy_folder
3434
run: |
3535
echo "Determining deployment folder..."
36-
if [ "${{ github.event_name }}" = "pull_request" ]; then
37-
echo "Deploying to target pr/${{ github.event.number }}"
38-
echo "DEPLOY_DIR=pr/${{ github.event.number }}" >> $GITHUB_OUTPUT
39-
elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
36+
if [[ "${{ github.ref }}" == refs/tags/* ]]; then
4037
echo "Deploying to target ${{ github.ref_name }}"
4138
echo "DEPLOY_DIR=${{ github.ref_name }}" >> $GITHUB_OUTPUT
4239
else
43-
echo "Deploying to target main"
44-
echo "DEPLOY_DIR=main" >> $GITHUB_OUTPUT
40+
echo "Deploying to target latest"
41+
echo "DEPLOY_DIR=latest" >> $GITHUB_OUTPUT
4542
fi
4643
4744
- name: Deploy to DEPLOY_DIR of TorchJD/documentation
4845
uses: peaceiris/actions-gh-pages@v4
4946
with:
50-
deploy_key: ${{ secrets.DOCUMENTATION_DEPLOY_KEY }}
47+
deploy_key: ${{ secrets.PROD_DOCUMENTATION_DEPLOY_KEY }}
5148
publish_dir: docs/build/dirhtml
5249
destination_dir: ${{ steps.deploy_folder.outputs.DEPLOY_DIR }}
5350
external_repository: TorchJD/documentation
@@ -57,7 +54,7 @@ jobs:
5754
if: startsWith(github.ref, 'refs/tags/')
5855
uses: peaceiris/actions-gh-pages@v4
5956
with:
60-
deploy_key: ${{ secrets.DOCUMENTATION_DEPLOY_KEY }}
57+
deploy_key: ${{ secrets.PROD_DOCUMENTATION_DEPLOY_KEY }}
6158
publish_dir: docs/build/dirhtml
6259
destination_dir: stable
6360
external_repository: TorchJD/documentation

.github/workflows/cleanup-pr-docs.yml

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,3 +29,24 @@ jobs:
2929
uses: codecov/codecov-action@v4
3030
with:
3131
token: ${{ secrets.CODECOV_TOKEN }}
32+
33+
build-doc:
34+
name: Build doc
35+
runs-on: ubuntu-latest
36+
permissions:
37+
contents: write
38+
steps:
39+
- name: Checkout repository
40+
uses: actions/checkout@v4
41+
42+
- name: Setup PDM
43+
uses: pdm-project/setup-pdm@v4
44+
with:
45+
python-version: '3.13'
46+
47+
- name: Install dependencies (default & doc)
48+
run: pdm install --group doc --frozen-lockfile
49+
50+
- name: Build Documentation
51+
working-directory: docs
52+
run: pdm run make dirhtml

0 commit comments

Comments
 (0)