Skip to content

Commit

Permalink
[#2258] Update user guide for Netlify deployment (#2294)
Browse files Browse the repository at this point in the history
Update Netlify build script

* Update the Netlify appendix method will not be supported going
forward.
* Update this page to recommend Github Actions instead of Netlify
* Change other references as needed.

Let's update relevant part of UG.
  • Loading branch information
CYX22222003 authored Feb 16, 2025
1 parent 1c4706a commit 9876607
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
Binary file modified docs/images/publishingguide-netlifypreview.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
11 changes: 6 additions & 5 deletions docs/ug/generatingReports.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,12 +50,13 @@ For other types of repositories, external links are disabled.

**You can generate a RepoSense report remotely without installing/running anything on your computer.** This is particularly useful when you are deciding whether to adopt RepoSense.

**The easiest option is to use Netlify.** The instructions are given below.

{{ embed("Appendix: **Using RepoSense with Netlify → Setting up**", "withNetlify.md#section-setting-up") }}

**You can also use the following options.** While they are more work to set up, they are more suitable as a permanent solution due to their generous free tier.
**The recommended option is to use GitHub Actions.** The instructions are given below.

{{ embed("Appendix: **Using RepoSense with GitHub Actions → Setting up**", "withGithubActions.md#section-setting-up") }}

**You can also use travis for deployment.** While there are more work to set up, it is more suitable as a permanent solution due to the generous free tier.

{{ embed("Appendix: **Using RepoSense with Travis → Setting up**", "withTravis.md#section-setting-up") }}

You may also consider using Netlify to deploy your report. **However, we may not support this method going forward.**
{{ embed("Appendix: **Using RepoSense with Netlify → Setting up**", "withNetlify.md#section-setting-up") }}
21 changes: 17 additions & 4 deletions docs/ug/withNetlify.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<box type="warning" seamless>

Note that Netlify has a low limit for free tier users (only 300 _build minutes_ per month as at June 2020 -- a single report generation can take 2-3 build minutes, longer if your report includes many/big repositories).
Note that Netlify has a low limit for free tier users (only 300 _build minutes_ per month as at June 2020 -- a single report generation can take 2-3 build minutes, longer if your report includes many/big repositories). Due to this, we will not be supporting this method going forward.
</box>

<!-- ==================================================================================================== -->
Expand All @@ -22,9 +22,22 @@ Note that Netlify has a low limit for free tier users (only 300 _build minutes_
{{ step(1) }} **Fork the _publish-RepoSense_ repository** using this [link](https://github.com/RepoSense/publish-RepoSense/fork). Optionally, you can rename the fork to match your RepoSense report e.g., `project-code-dashboard`.

{{ step(2) }} **Set up Netlify for your fork** as described in this [guide](https://www.netlify.com/blog/2016/09/29/a-step-by-step-guide-deploying-on-netlify/).<br>
==You will need to use the following in `Step 5: Configure Your Settings` of that guide==:
* build command: `pip install requests && ./run.sh`<br>
* publish directory: `./reposense-report`
==You don't need to follow `Step 5: Configure Your Settings` as we have provided you with a self-configured build script==:
* Ensure that the following `netlify.toml` is in your main repo:
```toml
[build]
command = """
wget https://download.java.net/java/ga/jdk11/openjdk-11_linux-x64_bin.tar.gz &&
tar -xvzf openjdk-11_linux-x64_bin.tar.gz &&
mv jdk-11 ~/openjdk11 &&
export JAVA_HOME=$HOME/openjdk11 &&
export PATH=$JAVA_HOME/bin:$PATH &&
pip install requests && ./run.sh
"""

publish = "./reposense-report"
base = "./"
```

After Netlify finishes building the site, you should be able to see a dummy report at the URL of your Netlify site.

Expand Down

0 comments on commit 9876607

Please sign in to comment.