diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f94e3d5..c951d32 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -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 diff --git a/README.md b/README.md index d65eef2..558c8c6 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,6 @@ # Website with Github Actions -Here I want to deploy a dynamic website. \ No newline at end of file +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). \ No newline at end of file diff --git a/index.html b/index.html new file mode 100644 index 0000000..7cbb03f --- /dev/null +++ b/index.html @@ -0,0 +1,24 @@ + + + + + + + My GitHub Page + + + +
+

Welcome to My GitHub Page!

+
+
+
+

This is a simple static webpage hosted on GitHub Pages using GitHub Actions for deployment.

+

Feel free to explore and modify the contents.

+
+
+ + + diff --git a/root/index.html b/root/index.html deleted file mode 100644 index 6e663b4..0000000 --- a/root/index.html +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - My GitHub Page - - -

Welcome to My GitHub Page!

-

This is a static website hosted on GitHub Pages.

- - diff --git a/styles.css b/styles.css new file mode 100644 index 0000000..55aef4a --- /dev/null +++ b/styles.css @@ -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; +}