Module 5 · Page 2 of 5

Share and deploy what you build

You've built an application that works on your computer. But how can someone else use it? In this lesson, you'll publish a website with GitHub Pages, learn how to update it safely, and explore Vercel as a way to prepare for applications with AI features.

It works on your computer. Now what?

Think back to the coffee shop dashboard from Module 4. You can open it in your browser, explore charts, and change filters. The coffee shop owner asks you to send a link so they can try it.

You send http://localhost:3000. They click it, but nothing appears. Why? localhost refers to the computer where a program is running. It isn't a public address for your dashboard.

Deployment means making a version of your project available in an environment where other people can access it. Hosting is the service that makes the website available; a URL is its web address.

Before: your dashboard runs only on your computer, perhaps at http://localhost:3000.

After: you can share a website address such as https://yourname.github.io/coffee-dashboard/. Others can open it in their browsers.

These addresses are examples. Your actual URL depends on your GitHub username and repository name.

GitHub can host your website, too

In the previous lesson, you learned that Git tracks changes and GitHub stores your repository online. GitHub also has a website-hosting service called GitHub Pages. For a simple website, you may not need another platform.

Build and test locally
        ↓
Commit and push to GitHub
        ↓
Publish with GitHub Pages
        ↓
Share your website URL

GitHub Pages is well suited to static websites: websites made from HTML, CSS, JavaScript, images, and other files delivered to visitors' browsers. Static doesn't mean uninteractive. A dashboard with filters, charts, or a calculator can still be a static website if its functionality runs in the browser.

Important distinction GitHub Pages does not run a persistent application server or your own server-side Python, PHP, or Node.js code. A project requiring a backend, private database access, user authentication logic, or securely stored API credentials usually needs additional services. We return to this when discussing AI APIs in the next lesson.

Deploy a simple website with GitHub Pages

Let's use a small HTML/CSS/JavaScript project. You can use a simple dashboard, portfolio, or calculator, as long as it has no confidential data or backend requirements.

Step 1: Ask your agent to check the project

Before publishing, check what kind of project you have. A plain HTML site is the easiest place to start; frameworks may need an extra build step.

Prompt
I want to publish this project using GitHub Pages.

Before changing anything:
1. Inspect how this project runs.
2. Tell me whether it can work as a static website.
3. Identify its entry point (such as index.html),
   assets, and any build steps.
4. Check for private data, passwords, and API keys.
5. Propose the simplest safe deployment plan.

Do not make the repository public or publish anything
without my approval.

Step 2: Put the website on GitHub

Use what you learned on Page 1 to commit the verified project and push it to a GitHub repository. For the simplest example, put index.html in the repository's root folder, alongside any necessary CSS, JavaScript, and assets. A basic project might look like this:

coffee-dashboard/
├── index.html
├── styles.css
├── script.js
└── data/
    └── sample-sales.csv

Notice that the data file will be part of the published website if the page uses it. Use only data that is safe to make public.

Step 3: Turn on GitHub Pages

  1. Open the repository on GitHub and select Settings.
  2. In the sidebar, open Pages.
  3. Under Build and deployment, choose Deploy from a branch.
  4. Select the branch containing your website (often main) and the /(root) folder; then click Save.
  5. When publishing finishes, open the site URL shown in Pages settings.

For a project site, the default address is usually https://USERNAME.github.io/REPOSITORY/. Publishing can take a few minutes. See the official GitHub Pages instructions if the interface changes.

Before you share: Check what others can see

Publishing is not just a technical step. Once others can open your application, you have to think about its data, functionality, and audience.

Remember Only publish a project that you are comfortable sharing publicly. GitHub Pages is a good learning platform for public demonstrations, not a substitute for access control when an application contains sensitive business information.

What if your dashboard uses confidential company data?

Suppose you build a sales dashboard for a company and want to share it with a client. The dashboard uses real transaction data, including sales figures, prices, and customer information.

You cannot simply publish the entire dataset on GitHub Pages. Even if the raw data is not visible on the screen, files included in the published website may still be accessible to visitors.

What should you do? It depends on what information the client needs and who is allowed to see it.

ApproachWhen to use it
Publish only approved summariesIf the client only needs aggregate results, such as sales trends or category totals, prepare those summaries internally and publish only the information approved for sharing. GitHub Pages may be sufficient.
Require users to log inIf the dashboard itself contains confidential information, use an application with authentication and access controls so only authorized clients can view it.
Keep the data on a secure backendIf clients need interactive access to confidential or frequently updated data, keep the underlying records in a protected database. The application retrieves and displays only the information each client is authorized to see.

Example: A consulting firm serving several retailers

Each retailer should be able to log in and explore its own sales performance, but should never see another retailer's data. The dashboard could be hosted on Vercel, with a backend that verifies users' permissions before retrieving and returning the appropriate data.

Remember: A private GitHub repository does not automatically make a published GitHub Pages website private. Similarly, deploying on Vercel does not automatically make your application secure. Authentication, permissions, and data protection must be designed into the application.

Going further: Deploy with Vercel

GitHub Pages is a good starting point, but you'll eventually want to build applications that do more than run code in a visitor's browser. For example, the next lesson will explore adding an AI feature that sends a request to a language model. That usually requires a server-side component so your API key isn't exposed to visitors.

Vercel is another hosting and deployment platform. Like GitHub Pages, it can publish a simple website. Unlike GitHub Pages, it also supports server-side functions that can communicate with APIs and other services. You can keep your code on GitHub and connect the same repository to Vercel. You do not need to abandon Git or GitHub.

Two ways to publish the same project:

Local project
    ↓
GitHub repository
    ├──→ GitHub Pages  → Static website
    └──→ Vercel        → Website + optional server-side functions

For now, both can serve your simple dashboard. Later, Vercel can also run a backend function that makes an AI API call without placing the API key in the website's browser code.

Why Vercel matters for the next lesson

Suppose you add a button to your coffee shop dashboard labeled Summarize this month's sales with AI. The browser needs to send the request somewhere. In a common architecture, a server-side function receives the request, calls the AI provider using a secret API key, and sends the result back to the browser.

User's browser → Your Vercel function → AI API
       ↑                                    │
       └──────── AI-generated summary ──────┘

Vercel lets you configure environment variables for server-side code, rather than putting secrets directly in browser JavaScript. But remember: environment variables included in client-side builds are not secret, and a secure design also needs appropriate authorization, input limits, and cost controls.

Exercise: Publish and update a website

Choose a simple static project—perhaps a dashboard or calculator built earlier in the course. Work through the following steps:

  1. Ask your agent to inspect the project and confirm that it can be deployed through GitHub Pages.
  2. Check for private data and secrets. Commit and push the verified website to GitHub.
  3. Enable GitHub Pages and open the published site.
  4. Visit the link from another browser or device and verify that the key features work.
  5. Make one small visible change (such as editing a heading), test it locally, push it, and confirm the live site updates.

Optional extension: Import the same GitHub repository into Vercel, open its new URL, and compare what the two deployment platforms do. You do not need to add AI functionality yet.

Next · Page 3 of 5
Put AI inside your solution
→