File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,7 @@ name: Deploy to GitHub Pages
22
33on :
44 push :
5- branches : [ master ]
5+ branches : [master]
66
77permissions :
88 contents : write
@@ -11,15 +11,15 @@ jobs:
1111 build-and-deploy :
1212 runs-on : ubuntu-latest
1313 env :
14- NEXT_PUBLIC_BASE_PATH : attarchi.github.io
14+ NEXT_PUBLIC_BASE_PATH :
1515 steps :
1616 - name : Checkout
1717 uses : actions/checkout@v4
1818
1919 - name : Setup Node.js
2020 uses : actions/setup-node@v4
2121 with :
22- node-version : ' 20 '
22+ node-version : " 20 "
2323
2424 - name : Get yarn cache directory path
2525 id : yarn-cache-dir-path
5454 with :
5555 folder : out
5656 branch : gh-pages
57- clean : true
57+ clean : true
Original file line number Diff line number Diff line change @@ -39,13 +39,7 @@ cd attarchi.github.io
3939yarn install
4040```
4141
42- 3 . Set up environment variables:
43- Create a ` .env ` file in the root directory with:
44- ```
45- NEXT_PUBLIC_BASE_PATH=your-username.github.io
46- ```
47-
48- 4 . Run the development server:
42+ 3 . Run the development server:
4943``` bash
5044yarn dev
5145```
@@ -98,13 +92,13 @@ The site is automatically deployed to GitHub Pages using GitHub Actions. Each pu
9892 - Set the source to "GitHub Actions"
9993
100942 . ** Environment Setup**
101- - Create a ` .env ` file with your GitHub Pages base path (< yourname >.github.io )
95+ - Create a ` .env ` file with your GitHub Pages base path (folder settings )
10296 - For GitHub Actions, add the environment variable to your GitHub repository:
10397 1 . Go to your repository settings
10498 2 . Navigate to "Secrets and variables" → "Actions"
10599 3 . Click "New repository secret"
106100 4 . Name: ` NEXT_PUBLIC_BASE_PATH `
107- 5 . Value: ` <yourname>.github.io `
101+ 5 . Value: ` GitHub Pages base path `
108102 6 . Click "Add secret"
109103
1101043 . ** Custom Domain (Optional)**
You can’t perform that action at this time.
0 commit comments