Skip to content

Commit

Permalink
fix(deployment): resolve GitHub Pages deployment permission error
Browse files Browse the repository at this point in the history
  • Loading branch information
saqibbedar committed Oct 10, 2024
1 parent 6705c77 commit 3599446
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
8 changes: 3 additions & 5 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
name: Deploy Reactfolio to GitHub Pages

# Triggers the workflow on push to the main branch
on:
push:
branches:
- main # Change this to your main branch if it's different
- main

jobs:
build:
Expand All @@ -17,12 +16,11 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '20.15.1' # Ensure this matches your Node version
node-version: '20.15.1'

- name: Install dependencies
run: npm install

# Step to modify vite.config.js to dynamically set base with the repository name
- name: Update vite.config.js base value
run: |
REPO_NAME=$(echo ${{ github.repository }} | cut -d'/' -f2)
Expand All @@ -36,4 +34,4 @@ jobs:
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist # This is where Vite outputs its build files
publish_dir: ./dist
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

<div align="center">
<span><h1><a href="https://saqibbedar.github.io/Reactfolio/" target="_blank">Reactfolio.</a> v1.2.0</h1></span>
<span><h1><a href="https://saqibbedar.github.io/Reactfolio/" target="_blank">Reactfolio.</a> v1.3.0</h1></span>

<span>Designed for developers looking to showcase their work with style and simplicity.</span>

Expand Down Expand Up @@ -35,7 +35,6 @@ Before starting, ensure you have the following installed on your machine:

> **Note:** You do not need Node.js installed on your machine as the build and deployment process will be handled by GitHub Actions.
</br>

# Getting started

Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "reactfolio",
"private": true,
"version": "1.2.0",
"version": "1.3.0",
"type": "module",
"scripts": {
"dev": "vite",
Expand Down

0 comments on commit 3599446

Please sign in to comment.