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
# 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
# (namespaces, classes, functions, etc.) that should be excluded from the

View File

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