diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index 3a6fde0a..00000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,79 +0,0 @@ -name: Deploy to Cloudflare Pages - -on: - push: - branches: [master] - workflow_run: - workflows: ["PR Build"] - types: [completed] - -permissions: - actions: read - contents: read - deployments: write - pull-requests: write - -jobs: - deploy: - if: | - github.event_name == 'push' || - (github.event_name == 'workflow_run' && - github.event.workflow_run.conclusion == 'success' && - github.event.workflow_run.event == 'pull_request') - runs-on: ubuntu-latest - steps: - - name: Checkout repository (push deployments) - if: github.event_name == 'push' - uses: actions/checkout@v4 - with: - persist-credentials: false - - - name: Set up Node.js (push deployments) - if: github.event_name == 'push' - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'npm' - - - name: Install dependencies (push deployments) - if: github.event_name == 'push' - run: npm ci - - - name: Build docs (push deployments) - if: github.event_name == 'push' - run: npm run build - - - name: Download build artifact (PR previews) - if: github.event_name == 'workflow_run' - uses: actions/download-artifact@v4 - with: - name: docusaurus-build - path: build - run-id: ${{ github.event.workflow_run.id }} - github-token: ${{ secrets.GITHUB_TOKEN }} - - - name: Deploy to Cloudflare Pages - id: deploy - uses: cloudflare/wrangler-action@v3 - with: - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} - command: pages deploy build --project-name=redot-docs-site --branch=${{ github.event_name == 'workflow_run' && format('pr-{0}', github.event.workflow_run.pull_requests[0].number) || github.ref_name }} - - - name: Comment PR with preview URL - if: github.event_name == 'workflow_run' && github.event.workflow_run.pull_requests[0].number - uses: actions/github-script@v7 - env: - DEPLOY_URL: ${{ steps.deploy.outputs.deployment-url }} - with: - script: | - const prNumber = context.payload.workflow_run.pull_requests[0]?.number; - const deployUrl = process.env.DEPLOY_URL; - if (prNumber && deployUrl) { - await github.rest.issues.createComment({ - issue_number: prNumber, - owner: context.repo.owner, - repo: context.repo.repo, - body: `šŸš€ **Preview deployment ready!**\n\nšŸ”— ${deployUrl}` - }); - } diff --git a/.github/workflows/pr-build.yml b/.github/workflows/pr-build.yml index aa5851bc..e2eaf409 100644 --- a/.github/workflows/pr-build.yml +++ b/.github/workflows/pr-build.yml @@ -17,7 +17,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: '20' + node-version: '24' cache: 'npm' - run: npm ci diff --git a/.github/workflows/sync_class_ref.yml b/.github/workflows/sync_class_ref.yml index cef20972..8e1e14da 100644 --- a/.github/workflows/sync_class_ref.yml +++ b/.github/workflows/sync_class_ref.yml @@ -1,8 +1,6 @@ name: Sync Class Reference on: - repository_dispatch: - types: [sync_class_ref] workflow_dispatch: # Scheduled updates only run on the default/master branch. # Other branches need to be run manually (usually after a new release for that branch). @@ -28,7 +26,7 @@ jobs: permissions: contents: write pull-requests: write - + steps: - name: Checkout the documentation repository uses: actions/checkout@v4 @@ -53,7 +51,22 @@ jobs: - name: Remove old documentation run: | - rm ${{ github.workspace }}/docs/Classes/class_*.md + excluded_files=( + "index.md" + ) + + shopt -s nullglob + + for file in "${{ github.workspace }}/docs/Classes"/*.md; do + filename="$(basename "$file")" + + if printf '%s\n' "${excluded_files[@]}" | grep -Fxq "$filename"; then + echo "Keeping excluded file: $filename" + continue + fi + + rm "$file" + done - name: Build new documentation run: | diff --git a/.gitignore b/.gitignore index 854d3760..7714be74 100644 --- a/.gitignore +++ b/.gitignore @@ -20,4 +20,5 @@ npm-debug.log* yarn-debug.log* yarn-error.log* .idea/ +.junie/ yarn.lock \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index 72e6da0e..5fca10cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -FROM node:20-alpine +FROM node:24-alpine WORKDIR /app