ongdisheng commented on issue #638: URL: https://github.com/apache/fesod/issues/638#issuecomment-3460980530
Hi @alaahong, I've been working on implementing Netlify preview deployments for documentation PRs, similar to the approach that you mentioned. I've tested the solution on my fork and would like to discuss the implementation before submitting a PR. ## Implementation The solution adds Netlify configuration to automatically deploy preview sites for documentation PRs. The main file is `netlify.toml` under the `website` directory, which includes an ignore rule that compares PR changes against the main branch. When a PR only modifies files outside the `website` directory, the build is skipped automatically in order to save build minutes and ensure preview deployments focus on documentation changes. I've also added `pnpm-lock.yaml` and updated pnpm-workspace.yaml so Netlify can correctly detect and use `pnpm` for dependency installation. ## Testing I've verified this implementation works correctly on my fork with two test PRs. You can see the complete implementation on my [`feat/netlify-preview-deployment`](https://github.com/ongdisheng/fesod/tree/feat/netlify-preview-deployment) branch, which contains the Netlify configuration files ready for upstream submission. Test PRs demonstrating the behavior: 1. [Website change PR](https://github.com/ongdisheng/fesod/pull/5): Preview deployed successfully with visible preview URL 2. [Non-website change PR](https://github.com/ongdisheng/fesod/pull/4): Build correctly skipped as shown below <img width="1014" height="572" alt="Image" src="https://github.com/user-attachments/assets/47079552-db90-4b31-96a3-61a717744dbb" /> ## Questions I have a few questions before submitting the PR: 1. May I know who can set up the Netlify account and connect it to the `apache/fesod` repository? This requires admin access to the GitHub repository. 2. The Netlify dashboard needs to be configured with `base = website` as the base directory, as shown below. <img width="610" height="390" alt="Image" src="https://github.com/user-attachments/assets/311ef887-6ba2-4587-a3a3-e70bec425b54" /> 3. Should Netlify skip building the main branch since the project uses GitHub Pages for production deployment? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
