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

Deploy to netlify #72

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,6 @@ dist-ssr
*.njsproj
*.sln
*.sw?

# Local Netlify folder
.netlify
30 changes: 29 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Read our goals and roadmap [here](ROADMAP.md).

A portfolio site template that looks and feels like a terminal.

Production: https://my-terminal-portfolio.vercel.app/
Production: <https://my-terminal-portfolio.vercel.app/>

## Installation

Expand Down Expand Up @@ -91,6 +91,34 @@ vercel

7. Once the deployment is complete, your terminal-portfolio will be live on Vercel, and Vercel Analytics will be enabled by default, providing you with valuable insights into your website's performance.

## Deploying to Netlify

Deploying to Netlify can also be a great idea. Which is also wonderful web hosting platform. For deploying to Netlify, we can use two main approaches and we will discuss them in detail.

### Deploying to Netlify through the CLI

1. Bear in mind that this project is using Vite framework. To make sure you are using the latest Netlify CLI, run the following command in the project terminal:
`npm install netlify-cli -g`

2. Next, in the directory of your project, run the following command to create a new file on Netlify:
`netlify init`

3. In case you are new to Netlify, you will be redirected to create a profile on the platform or you can use your github profile to connect to the platform.

4. Once netlify is initialized, follow the prompts carefully, select the team option if necessary and then optionally personalize the site name if any.

5. Go back to the netlify platform on the browser and reload the page.

### Optionally deploying to Netlify through GitHub

1. Upload your project source code to your github profile.

2. Go to [netlify](https://www.netlify.com/) and sign up to the platform using your github profile.

3. On your netlify page, go to 'add new site' option and select the 'import an existing project'.

4. Follow the prompts and your project is hosted by netlify. Optionally, you can customize the site if you want.

## Contributing

[Contributing Guide](CONTRIBUTING.md)
Expand Down
21 changes: 21 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# example netlify.toml
[build]
command = "vite build"
functions = "netlify/functions"
publish = "dist"

## Uncomment to use this redirect for Single Page Applications like create-react-app.
## Not needed for static site generators.
#[[redirects]]
# from = "/*"
# to = "/index.html"
# status = 200

## (optional) Settings for Netlify Dev
## https://github.com/netlify/cli/blob/main/docs/netlify-dev.md#project-detection
#[dev]
# command = "yarn start" # Command to start your dev server
# port = 3000 # Port that the dev server will be listening on
# publish = "dist" # Folder with the static content for _redirect file

## more info on configuring this file: https://docs.netlify.com/configure-builds/file-based-configuration/