From 61ad577713298181b3c7aa547408600ace2819d7 Mon Sep 17 00:00:00 2001 From: Yusuf Kaka Date: Sat, 8 Feb 2025 21:06:52 +0200 Subject: [PATCH] Trying an improved deploy action --- .github/workflows/deploy.yml | 41 ++++++++++++++++++++------- src/components/about.jsx | 55 ------------------------------------ src/components/header.jsx | 13 ++++++++- 3 files changed, 43 insertions(+), 66 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 3e9d490..545f5d3 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -3,22 +3,26 @@ name: Deploy to GitHub Pages on: push: branches: - - master # or the branch you want to deploy from + - master pull_request: types: - closed branches: - master +concurrency: + group: "pages" + cancel-in-progress: false + jobs: build: - # Only run if PR was merged - if: github.event.pull_request.merged == true + # Modified condition to handle both direct pushes and merged PRs + if: github.event_name == 'push' || github.event.pull_request.merged == true runs-on: ubuntu-latest steps: - name: Checkout code - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Generate index files run: | @@ -33,18 +37,35 @@ jobs: done - name: Set up Node.js - uses: actions/setup-node@v2 + uses: actions/setup-node@v4 with: node-version: '18' + cache: 'npm' # Add caching for faster installations + + - name: Setup Pages + uses: actions/configure-pages@v5 - name: Install dependencies - run: npm install + run: npm ci # Use ci instead of install for cleaner, more reliable builds - name: Build project run: npm run build - - name: Deploy to GitHub Pages - uses: peaceiris/actions-gh-pages@v3 + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./build \ No newline at end of file + path: ./out + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + permissions: + pages: write + id-token: write + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/src/components/about.jsx b/src/components/about.jsx index d4ee68a..0a7cb1f 100755 --- a/src/components/about.jsx +++ b/src/components/about.jsx @@ -60,61 +60,6 @@ export default class About extends Component { {/* End About Me */} - {/* ======= Counts ======= */} - {/* -
-
-
-
- - -

Happy Clients

-
-
-
-
- - -

Projects

-
-
-
-
- - -

Hours Of Support

-
-
-
-
- - -

Awards

-
-
-
-
- {/* End Counts */} {/* ======= Skills ======= */}
diff --git a/src/components/header.jsx b/src/components/header.jsx index 240e32c..717a84a 100755 --- a/src/components/header.jsx +++ b/src/components/header.jsx @@ -13,7 +13,18 @@ export default class Header extends Component {

I'm a passionate 
- {/* slider content */} +
    +
  • Engineer
  • +
  • Husband
  • +
  • Product Manager
  • +
  • Wanderer
  • +
  • Father
  • +
  • Mountain Biker
  • +
  • Tinkerer
  • +
  • Muslim
  • +
  • Technologist
  • +
  • Engineer
  • +