Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Steps component to google-cloud.mdx #8106

Merged
merged 1 commit into from
May 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/content/docs/en/guides/deploy/google-cloud.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@ description: How to deploy your Astro site to the web using Google Cloud.
type: deploy
i18nReady: true
---
import { Steps } from '@astrojs/starlight/components';

[Google Cloud](https://cloud.google.com/) is a full-featured web app hosting platform that can be used to deploy an Astro site.

## How to deploy

### Cloud Storage (static only)

<Steps>
1. [Create a new GCP project](https://console.cloud.google.com/projectcreate), or select one you already have.

2. Create a new bucket under [Cloud Storage](https://cloud.google.com/storage).
Expand All @@ -22,19 +24,21 @@ i18nReady: true
5. Enable public access by adding a new permission to `allUsers` called `Storage Object Viewer`.

6. Edit the website configuration and add `ìndex.html` as the entrypoint and `404.html` as the error page.
</Steps>

### Cloud Run (SSR and static)

Cloud Run is a serverless platform that allows you to run a container without having to manage any infrastructure. It can be used to deploy both static and SSR sites.

#### Prepare the Service

<Steps>
1. [Create a new GCP project](https://console.cloud.google.com/projectcreate), or select one you already have.

2. Make sure the [Cloud Run API](https://console.cloud.google.com/apis/library/run.googleapis.com) is enabled.

3. Create a new service.

</Steps>

#### Create Dockerfile & Build the Container

Expand Down Expand Up @@ -64,7 +68,6 @@ Change the following values in the commands above to match your project:
- `TARGET-IMAGE`: the name for the image when it's stored in the registry.
- `TAG` is the version associated with the image.


[Read more in the Google Cloud docs.](https://cloud.google.com/artifact-registry/docs/docker/pushing-and-pulling)

**Using another tool**:
Expand Down
Loading