Skip to content

Commit

Permalink
Static site tutorial update (#379)
Browse files Browse the repository at this point in the history
  • Loading branch information
thisisjofrank authored Mar 27, 2024
1 parent 72dd68b commit 766920f
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions deploy/tutorials/static-site.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
This tutorial will cover how to deploy a static site (no JavaScript) on Deno
Deploy.

## **Step 1:** Create the static site
## Step 1: Create the static site

```sh
mkdir static-site
Expand All @@ -30,18 +30,12 @@ Make sure that there a `image.png` inside `static-site`.

You have now a html page that says "Hello" and has a logo.

## **Step 2:** Create a new Deno project

1. Navigate to https://dash.deno.com/new and click the **+Empty Project** button
under **Deploy from command line**.
2. On the next page, grab the project name, in this case `careful-goat-90`.

## **Step 3:** Deploy the static site using `deployctl`
## Step 2: Deploy the static site using `deployctl`

To deploy this repo on Deno Deploy, from the `static-site` repository, run:

```console
deployctl deploy --project=careful-goat-90 https://deno.land/std@$STD_VERSION/http/file_server.ts
deployctl deploy --project=<your-preferred-project-name> https://deno.land/std@0.220.0/http/file_server.ts
```

To give a little more explanation of these commands: Because this is a static
Expand All @@ -51,8 +45,10 @@ it this external `file_server.ts` program, which simply uploads all the static
files in the `static-site` repo, including the image and the html page, to Deno
Deploy. These static assets are then served up.

## **Step 4:** Voila!
## Step 3: Voila!

If you go under the **Deployments** tab in the `careful-goat-90` project page,
you will see the link to this dev deployment. If you click on the url, you
should now see your html page with the "Hello" and the image.
Your static site should now be live! Its url will be output in the terminal, or
you can manage your new static site project in your
[Deno dashboard](https://dash.deno.com/projects/). If you click through to your
new project you will be able to view the site, configure its name, environment
variables, custom domains and more.

0 comments on commit 766920f

Please sign in to comment.