Skip to content

Commit

Permalink
new test
Browse files Browse the repository at this point in the history
  • Loading branch information
Welf42 committed Oct 21, 2024
1 parent 74870e1 commit 88a9ba7
Show file tree
Hide file tree
Showing 5 changed files with 67 additions and 30 deletions.
27 changes: 10 additions & 17 deletions .github/workflows/deploy.yml
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
5 changes: 4 additions & 1 deletion README.md
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).
24 changes: 24 additions & 0 deletions index.html
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>&copy; 2024 My GitHub Page. All rights reserved.</p>
</footer>
</body>
</html>
12 changes: 0 additions & 12 deletions root/index.html

This file was deleted.

29 changes: 29 additions & 0 deletions styles.css
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;
}

0 comments on commit 88a9ba7

Please sign in to comment.