doxygen doc are too big for pages, use R2

This commit is contained in:
SoftFever
2026-01-04 11:12:28 +08:00
parent 86c6cf7b91
commit 2e53e9db02
2 changed files with 41 additions and 8 deletions

View File

@@ -1059,7 +1059,11 @@ EXCLUDE_SYMLINKS = NO
# Note that the wildcards are matched against the file with absolute path, so to # Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/* # exclude all test directories for example use the pattern */test/*
EXCLUDE_PATTERNS = EXCLUDE_PATTERNS = */deps/*
EXCLUDE_PATTERNS = */build/*
EXCLUDE_PATTERNS = */deps_src/*
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the # (namespaces, classes, functions, etc.) that should be excluded from the

View File

@@ -13,25 +13,30 @@ jobs:
build-and-deploy: build-and-deploy:
name: Build and Deploy Docs name: Build and Deploy Docs
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 60
# Only run on main branch of the main repository # Only run on main branch of the main repository
if: github.repository == 'OrcaSlicer/OrcaSlicer' && github.ref == 'refs/heads/main' if: github.repository == 'OrcaSlicer/OrcaSlicer' && github.ref == 'refs/heads/main'
permissions:
contents: read
steps: steps:
- uses: thejerrybao/setup-swap-space@v1 - uses: thejerrybao/setup-swap-space@v1
with: with:
swap-space-path: /swapfile swap-space-path: /swapfile
swap-size-gb: 8 swap-size-gb: 8
remove-existing-swap-files: true remove-existing-swap-files: true
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v6 uses: actions/checkout@v6
- name: Install Doxygen and Graphviz - name: Install Doxygen and Graphviz
run: | run: |
set -euo pipefail
sudo apt-get update sudo apt-get update
sudo apt-get install -y doxygen graphviz sudo apt-get install -y doxygen graphviz
- name: Generate documentation - name: Generate documentation
run: | run: |
set -euo pipefail
# Override DOT_NUM_THREADS to avoid parallel dot race condition bug # Override DOT_NUM_THREADS to avoid parallel dot race condition bug
sed -i 's/^DOT_NUM_THREADS.*/DOT_NUM_THREADS = 1/' .doxygen sed -i 's/^DOT_NUM_THREADS.*/DOT_NUM_THREADS = 1/' .doxygen
doxygen .doxygen doxygen .doxygen
@@ -40,10 +45,34 @@ jobs:
echo "Error: Documentation generation failed - index.html not found" echo "Error: Documentation generation failed - index.html not found"
exit 1 exit 1
fi fi
- name: Install Rclone
run: |
set -euo pipefail
sudo -v
curl -fsSL https://rclone.org/install.sh | sudo bash
- name: Deploy to Cloudflare Pages - name: optimize
uses: cloudflare/wrangler-action@v3 run: |
with: set -euo pipefail
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} rm -f internal_docs/Nodes.xml internal_docs/Tokens.xml
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} find internal_docs -name "*.map" -type f -delete || true
command: pages deploy internal_docs --project-name=orcaslicer-internals find internal_docs -name "*.md5" -type f -delete || true
- name: upload
# We configure rclone dynamically using environment variables
run: |
set -euo pipefail
# Remove existing config if it exists to avoid conflicts
rclone config delete cloudflare 2>/dev/null || true
rclone config create cloudflare s3 \
provider Cloudflare \
access_key_id ${{ secrets.R2_ACCESS_KEY_ID }} \
secret_access_key ${{ secrets.R2_SECRET_ACCESS_KEY }} \
endpoint ${{ secrets.R2_ENDPOINT }}
rclone sync internal_docs/ cloudflare:orcaslicer-internals \
--progress \
--transfers 512 \
--checkers 512
echo "Documentation upload completed successfully"