Skip to content

Commit fadd42c

Browse files
committed
Fix github pages builds in project templates
1 parent d03de43 commit fadd42c

File tree

4 files changed

+9
-7
lines changed

4 files changed

+9
-7
lines changed

lib/templates/minimal/.github/workflows/deploy-to-gh-pages.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@ jobs:
4040
${{ runner.os }}-
4141
4242
- name: Install and Build 🔧
43+
env:
44+
REPO_NAME: ${{ github.event.repository.name }}
4345
run: |
4446
npm install
4547
npm run build

lib/templates/minimal/vue.config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ module.exports = {
2020
stylelint: {}
2121
},
2222
publicPath:
23-
process.env.NODE_ENV === 'production' &&
24-
process.env.GITHUB_ACTION_REPOSITORY
25-
? '/' + process.env.GITHUB_ACTION_REPOSITORY.split('/')[1] + '/'
23+
process.env.NODE_ENV === 'production' && process.env.REPO_NAME
24+
? '/' + process.env.REPO_NAME + '/'
2625
: '/'
2726
};

lib/templates/showroom/.github/workflows/deploy-to-gh-pages.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ jobs:
3939
${{ runner.os }}-build-
4040
${{ runner.os }}-
4141
42-
- name: Install and Build 🔧
42+
- name:
43+
env:
44+
REPO_NAME: ${{ github.event.repository.name }}
4345
run: |
4446
npm install
4547
npm run build

lib/templates/showroom/vue.config.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,7 @@ module.exports = {
2020
stylelint: {}
2121
},
2222
publicPath:
23-
process.env.NODE_ENV === 'production' &&
24-
process.env.GITHUB_ACTION_REPOSITORY
25-
? '/' + process.env.GITHUB_ACTION_REPOSITORY.split('/')[1] + '/'
23+
process.env.NODE_ENV === 'production' && process.env.REPO_NAME
24+
? '/' + process.env.REPO_NAME + '/'
2625
: '/'
2726
};

0 commit comments

Comments
 (0)