-
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.
- Loading branch information
Showing
5 changed files
with
67 additions
and
30 deletions.
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 |
---|---|---|
@@ -1,29 +1,22 @@ | ||
# .github/workflows/deploy.yml | ||
name: Deploy GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main # Triggers the action on push to the main branch | ||
- main # Change this if you're deploying from a different branch | ||
|
||
jobs: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
- name: Checkout the repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup Node.js (if you are using a static site generator like Jekyll or Hugo) | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: '14' | ||
|
||
- name: Build site (if needed) | ||
run: npm install && npm run build | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./ # Change this if your static site generator outputs files to a different folder | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v4 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# publish_branch: gh-pages # GitHub Pages will serve from this branch | ||
publish_branch: main # GitHub Pages will serve from this branch | ||
publish_dir: ./ # Root directory of your repository |
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 |
---|---|---|
@@ -1,3 +1,6 @@ | ||
# Website with Github Actions | ||
|
||
Here I want to deploy a dynamic website. | ||
Here I want to deploy a dynamic website. | ||
|
||
React: Deployed as a static website (e.g., GitHub Pages or Netlify). | ||
Django: Hosted on a server that supports Python and Django (e.g., Heroku, DigitalOcean, AWS). |
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,24 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
<meta http-equiv="X-UA-Compatible" content="ie=edge"> | ||
<title>My GitHub Page</title> | ||
<link rel="stylesheet" href="styles.css"> | ||
</head> | ||
<body> | ||
<header> | ||
<h1>Welcome to My GitHub Page!</h1> | ||
</header> | ||
<main> | ||
<section> | ||
<p>This is a simple static webpage hosted on GitHub Pages using GitHub Actions for deployment.</p> | ||
<p>Feel free to explore and modify the contents.</p> | ||
</section> | ||
</main> | ||
<footer> | ||
<p>© 2024 My GitHub Page. All rights reserved.</p> | ||
</footer> | ||
</body> | ||
</html> |
This file was deleted.
Oops, something went wrong.
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,29 @@ | ||
body { | ||
font-family: Arial, sans-serif; | ||
margin: 0; | ||
padding: 0; | ||
background-color: #f4f4f4; | ||
color: #333; | ||
} | ||
|
||
header { | ||
background-color: #007acc; | ||
padding: 20px; | ||
text-align: center; | ||
color: white; | ||
} | ||
|
||
main { | ||
padding: 20px; | ||
text-align: center; | ||
} | ||
|
||
footer { | ||
background-color: #333; | ||
color: white; | ||
text-align: center; | ||
padding: 10px; | ||
position: fixed; | ||
width: 100%; | ||
bottom: 0; | ||
} |