summaryrefslogtreecommitdiff
path: root/docs/src/pages/guides
diff options
context:
space:
mode:
authorGravatar Caleb Jasik <calebjasik@jasik.xyz> 2021-10-18 22:15:04 -0500
committerGravatar GitHub <noreply@github.com> 2021-10-18 22:15:04 -0500
commitf798663570a0d10adc83b7aec93bfee6ee96d8dd (patch)
treedbccaccf54a430524205f5f3be5d519af4920394 /docs/src/pages/guides
parent598b64f7117e5c80da6405db0b3d3d6495176c6e (diff)
downloadastro-f798663570a0d10adc83b7aec93bfee6ee96d8dd.tar.gz
astro-f798663570a0d10adc83b7aec93bfee6ee96d8dd.tar.zst
astro-f798663570a0d10adc83b7aec93bfee6ee96d8dd.zip
Docs/update-gitlab-deploy (#1586)
Co-authored-by: Peter Singh <drgaud@hotmail.com>
Diffstat (limited to 'docs/src/pages/guides')
-rw-r--r--docs/src/pages/guides/deploy.md24
1 files changed, 20 insertions, 4 deletions
diff --git a/docs/src/pages/guides/deploy.md b/docs/src/pages/guides/deploy.md
index 663451e74..d65fcfbc9 100644
--- a/docs/src/pages/guides/deploy.md
+++ b/docs/src/pages/guides/deploy.md
@@ -162,11 +162,27 @@ jobs:
## GitLab Pages
1. Set the correct `buildOptions.site` in `astro.config.mjs`.
-2. Set `build` in `astro.config.mjs` to `public` and `public` in `astro.config.mjs` to a newly named folder that is holding everything currently in `public`. The reasoning is because `public` is a second source folder in astro, so if you would like to output to `public` you'll need to pull public assets from a different folder.
+2. Set `dist` in `astro.config.mjs` to `public` and `public` in `astro.config.mjs` to a newly named folder that is holding everything currently in `public`. The reasoning is because `public` is a second source folder in astro, so if you would like to output to `public` you'll need to pull public assets from a different folder. Your `astro.config.mjs` might end up looking like this:
+
+```js
+export default /** @type {import('astro').AstroUserConfig} */ ({
+ // Enable the Preact renderer to support Preact JSX components.
+ renderers: ['@astrojs/renderer-preact'],
+ // files in `static/` will be blindly copied to `public/`
+ public: 'static',
+ // `public/` is where the built website will be output to
+ dist: 'public',
+ buildOptions: {
+ sitemap: true,
+ site: 'https://astro.build/',
+ },
+});
+```
+
3. Create a file called `.gitlab-ci.yml` in the root of your project with the content below. This will build and deploy your site whenever you make changes to your content:
```yaml
- image: node:10.22.0
+ image: node:14
pages:
cache:
paths:
@@ -178,7 +194,7 @@ jobs:
paths:
- public
only:
- - master
+ - main
```
## Netlify
@@ -390,7 +406,7 @@ You can deploy your Astro project using [Buddy](https://buddy.works). To do so y
4. In the newly created pipeline add a **[Node.js](https://buddy.works/actions/node-js)** action.
5. In this action add:
- ```node
+ ```bash
npm install
npm run build
```