aboutsummaryrefslogtreecommitdiffstats
path: root/static-builds/README.md
diff options
context:
space:
mode:
authorGravatar Hassan Abouelela <[email protected]>2022-07-12 09:52:06 +0400
committerGravatar Hassan Abouelela <[email protected]>2022-07-12 14:54:34 +0400
commit0404e0040a0a6fc4f4520bfdc14b800390800382 (patch)
treea38743b58d056d6ce9af7afc865988db72792511 /static-builds/README.md
parentAdd GitHub Artifact API View (diff)
Update Netlify Build Script
Update the netlify build script to use the artifacts API from the site. Signed-off-by: Hassan Abouelela <[email protected]>
Diffstat (limited to 'static-builds/README.md')
-rw-r--r--static-builds/README.md24
1 files changed, 17 insertions, 7 deletions
diff --git a/static-builds/README.md b/static-builds/README.md
index 9b86ed08..a3c7962b 100644
--- a/static-builds/README.md
+++ b/static-builds/README.md
@@ -27,16 +27,29 @@ Alternatively, you can use the [Dockerfile](/Dockerfile) and extract the build.
Both output their builds to a `build/` directory.
### Deploying To Netlify
-To deploy to netlify, link your site GitHub repository to a netlify site, and use the following settings:
+To deploy to netlify, link your site GitHub repository to a netlify site, and use the settings below.
+The netlify build script uses the site API to fetch and download the artifact, using a GitHub app that
+can access the repo. The app must have the `actions` and `artifacts` scopes enabled.
+### Netlify Settings
Build Command:
-`python -m pip install httpx==0.19.0 && python static-builds/netlify_build.py`
+`python -m pip install httpx==0.23.0 && python static-builds/netlify_build.py`
Publish Directory:
`build`
-Environment Variables:
-- PYTHON_VERSION: 3.8
+**Environment Variables**
+
+| Name | Value | Description |
+|----------------|--------------------------------|-------------------------------------------------------------------------------------------|
+| PYTHON_VERSION | 3.8 | The python version. Supported options are defined by netlify [here][netlify build image]. |
+| API_URL | https://pythondiscord.com/ | The link to the API, which will be used to fetch the build artifacts. |
+| ACTION_NAME | Build & Publish Static Preview | The name of the workflow which will be used to find the artifact. |
+| ARTIFACT_NAME | static-build | The name of the artifact to download. |
+
+
+[netlify build image]: https://github.com/netlify/build-image/tree/focal
+
Note that at this time, if you are deploying to netlify yourself, you won't have access to the
@@ -45,6 +58,3 @@ You can either update the pack to one which will work on your domain, or you'll
> Warning: If you are modifying the [build script](./netlify_build.py), make sure it is compatible with Python 3.8.
-
-Note: The build script uses [nightly.link](https://github.com/oprypin/nightly.link)
-to fetch the artifact with no authentication.