Skip to content

Commit 8995a61

Browse files
committed
Fix templates to allow for multi-experiment repos
1 parent 58381e9 commit 8995a61

File tree

4 files changed

+9
-11
lines changed

4 files changed

+9
-11
lines changed

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,18 @@ jobs:
1212
strategy:
1313
matrix:
1414
folder:
15-
- ./
15+
- ./
1616

1717
runs-on: ubuntu-latest
1818
steps:
1919
- name: Checkout 🛎️
2020
uses: actions/checkout@v2.3.1
2121

22-
- name: Change directory
23-
run: cd ${{ matrix.folder }}
24-
2522
- name: Read package.json node and npm engines version
2623
uses: skjnldsv/read-package-engines-version-actions@v1.1
2724
id: versions
2825
with:
26+
path: ${{matrix.folder}}
2927
fallbackNode: '^12'
3028
fallbackNpm: '^6'
3129

@@ -53,6 +51,7 @@ jobs:
5351
env:
5452
REPO_NAME: ${{ github.event.repository.name }}
5553
run: |
54+
cd ${{matrix.folder}}
5655
npm install
5756
npm run build
5857
@@ -67,6 +66,6 @@ jobs:
6766
uses: JamesIves/github-pages-deploy-action@4.1.5
6867
with:
6968
branch: gh-pages
70-
folder: dist
69+
folder: ${{ matrix.folder }}/dist
7170
target-folder: ${{ matrix.folder }}
7271
token: ${{ secrets.GITHUB_TOKEN }}

lib/templates/minimal/vue.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ module.exports = {
2323
process.env.NODE_ENV === 'production' && process.env.REPO_NAME
2424
? '/' +
2525
process.env.REPO_NAME +
26-
__dirname.substring(0, process.env.GITHUB_WORKSPACE.length)
26+
__dirname.substring(process.env.GITHUB_WORKSPACE.length)
2727
: '/'
2828
};

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

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,11 @@ jobs:
1919
- name: Checkout 🛎️
2020
uses: actions/checkout@v2.3.1
2121

22-
- name: Change directory
23-
run: cd ${{ matrix.folder }}
24-
2522
- name: Read package.json node and npm engines version
2623
uses: skjnldsv/read-package-engines-version-actions@v1.1
2724
id: versions
2825
with:
26+
path: ${{matrix.folder}}
2927
fallbackNode: '^12'
3028
fallbackNpm: '^6'
3129

@@ -53,6 +51,7 @@ jobs:
5351
env:
5452
REPO_NAME: ${{ github.event.repository.name }}
5553
run: |
54+
cd ${{matrix.folder}}
5655
npm install
5756
npm run build
5857
@@ -67,6 +66,6 @@ jobs:
6766
uses: JamesIves/github-pages-deploy-action@4.1.5
6867
with:
6968
branch: gh-pages
70-
folder: dist
69+
folder: ${{ matrix.folder }}/dist
7170
target-folder: ${{ matrix.folder }}
7271
token: ${{ secrets.GITHUB_TOKEN }}

lib/templates/showroom/vue.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ module.exports = {
2323
process.env.NODE_ENV === 'production' && process.env.REPO_NAME
2424
? '/' +
2525
process.env.REPO_NAME +
26-
__dirname.substring(0, process.env.GITHUB_WORKSPACE.length)
26+
__dirname.substring(process.env.GITHUB_WORKSPACE.length)
2727
: '/'
2828
};

0 commit comments

Comments
 (0)