-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Pages deployment and custom domain configuration
* **package.json** - Add `gh-pages` to `devDependencies` - Add `deploy` script to deploy the frontend to GitHub Pages * **.github/workflows/deploy.yml** - Create a GitHub Actions workflow file to automate deployment to GitHub Pages - Use `actions/checkout@v2` to check out the repository - Use `actions/setup-node@v2` to set up Node.js - Run `npm install` and `npm run deploy` to deploy the frontend * **404.html** - Create a `404.html` file with a simple HTML structure to handle GitHub Pages routing issues * **CNAME** - Create a `CNAME` file for custom domain configuration - Add the custom domain name to the `CNAME` file
- Loading branch information
1 parent
225a984
commit 51e298e
Showing
5 changed files
with
57 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Install dependencies | ||
run: npm install | ||
|
||
- name: Deploy to GitHub Pages | ||
run: npm run deploy | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<title>Page Not Found</title> | ||
<style> | ||
body { | ||
font-family: Arial, sans-serif; | ||
text-align: center; | ||
padding: 50px; | ||
} | ||
h1 { | ||
font-size: 50px; | ||
} | ||
p { | ||
font-size: 20px; | ||
} | ||
</style> | ||
</head> | ||
<body> | ||
<h1>404</h1> | ||
<p>Page Not Found</p> | ||
<p>The page you are looking for does not exist.</p> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
example.com |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters