diff options
author | 2021-09-14 18:25:49 -0500 | |
---|---|---|
committer | 2021-09-14 16:25:49 -0700 | |
commit | 5237db20b93d4c5c44fb4ae95e250f487999cfb9 (patch) | |
tree | f2acef8dc6e31d3fbaa6544618a38b518dc3d41f /docs/src | |
parent | 6f1e714962f0f64551a84048ab3566c2712aaf87 (diff) | |
download | astro-5237db20b93d4c5c44fb4ae95e250f487999cfb9.tar.gz astro-5237db20b93d4c5c44fb4ae95e250f487999cfb9.tar.zst astro-5237db20b93d4c5c44fb4ae95e250f487999cfb9.zip |
Update deployment docs for Netlify deployment (#1361)
* Update build command for Netlify
* Clarify directions for Netlify deploy versions
* Create deploy.md
* Update deploy.md
* Update deploy.md
Co-authored-by: Fred K. Schott <fkschott@gmail.com>
Diffstat (limited to 'docs/src')
-rw-r--r-- | docs/src/pages/guides/deploy.md | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/docs/src/pages/guides/deploy.md b/docs/src/pages/guides/deploy.md index 6dc96ede9..4b877ec12 100644 --- a/docs/src/pages/guides/deploy.md +++ b/docs/src/pages/guides/deploy.md @@ -182,11 +182,13 @@ jobs: ## Netlify -In your codebase, make sure you have a [`.nvmrc`](https://github.com/nvm-sh/nvm#nvmrc) file with `node v14.15.1` in it. +**Note:** If you are using an older [build image](https://docs.netlify.com/configure-builds/get-started/#build-image-selection) on Netlify, make sure that you set your Node.js version in either a [`.nvmrc`](https://github.com/nvm-sh/nvm#nvmrc) file (example: `node v14.17.6`) or a `NODE_VERSION` environment variable. This step is no longer required by default. -You can configure your deploy in two ways, via the Netlify website or with the `netlify.toml` file. +You can configure your deployment in two ways, via the Netlify website or with a local project `netlify.toml` file. -With the `netlify.toml` file, add it at the top level of your project with the following settings: +### `netlify.toml` file + +Create a new `netlify.toml` file at the top level of your project repository with the following settings: ```toml [build] @@ -194,15 +196,15 @@ With the `netlify.toml` file, add it at the top level of your project with the f publish = "dist" ``` -Then, set up a new project on [Netlify](https://netlify.com) from your chosen Git provider. +Push the new `netlify.toml` file up to your hosted git repository. Then, set up a new project on [Netlify](https://netlify.com) for your git repository. Netlify will read this file and automatically configure your deployment. + +### Netlify Website UI -If you don't want to use the `netlify.toml`, when you go to [Netlify](https://netlify.com) and set up a new project from Git, input the following settings: +You can skip the `netlify.toml` file and go directly to [Netlify](https://netlify.com) to configure your project. Netlify should now detect Astro projects automatically and pre-fill the configuration for you. Make sure that the following settings are entered before hitting the "Deploy" button: - **Build Command:** `astro build` or `npm run build` - **Publish directory:** `dist` -Then hit the deploy button. - ## Google Firebase 1. Make sure you have [firebase-tools](https://www.npmjs.com/package/firebase-tools) installed. |