Skip to content

Commit fbd1a86

Browse files
authored
chore(workflow): inject GTM in demo
1 parent eca336c commit fbd1a86

File tree

1 file changed

+25
-16
lines changed

1 file changed

+25
-16
lines changed

.github/workflows/deploy-demos.yml

Lines changed: 25 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -6,24 +6,37 @@ jobs:
66
build:
77
runs-on: ubuntu-latest
88
steps:
9+
- name: ⚙️ Setup pnpm
10+
uses: pnpm/action-setup@v3
11+
with:
12+
version: 8
13+
914
- name: ⚙️ Set BRAND_NAME environment variable from repo name
1015
run: echo BRAND_NAME=${{ github.event.repository.name }} | cut -d '-' -f1 >> $GITHUB_ENV
1116

12-
- name: ⬇️ Checkout template
13-
uses: actions/checkout@v3
14-
15-
- name: ⚙️ Setup pnpm
16-
uses: pnpm/action-setup@v2
17+
- name: ⬇️ Clone current repo under /<brand-name>/vue-free
18+
uses: actions/checkout@v4
1719
with:
18-
version: 8
20+
path: ${{ env.BRAND_NAME }}/vue-free
1921

20-
- name: ⬇️ Install packages
22+
- name: ⬇️ Clone automation scripts repo under /automation-scripts
23+
uses: actions/checkout@v4
24+
with:
25+
repository: themeselection/automation-scripts
26+
token: ${{ secrets.GH_PAT }}
27+
path: automation-scripts
28+
29+
- name: ⬇️ Install packages in automation-scripts dir
30+
working-directory: automation-scripts/vue
2131
run: pnpm install
22-
working-directory: ./typescript-version
32+
33+
- name: ⚙️ Prepare free demo
34+
working-directory: automation-scripts/vue
35+
run: pnpm tsx src/templates/${{ env.BRAND_NAME }}/scripts/prepareVueFreeDemo.ts
2336

2437
- name: 📦 Generate demo
25-
run: pnpm build --base=/${{ env.BRAND_NAME }}-vuetify-vuejs-admin-template-free/demo/
26-
working-directory: ./typescript-version
38+
working-directory: ${{ env.BRAND_NAME }}/vue-free/typescript-version
39+
run: pnpm i && pnpm build --base=/${{ env.BRAND_NAME }}-vuetify-vuejs-admin-template-free/demo/
2740

2841
- name: 🚀 Upload demo
2942
uses: appleboy/scp-action@master
@@ -32,11 +45,7 @@ jobs:
3245
USERNAME: ${{ secrets.USERNAME }}
3346
PORT: ${{ secrets.PORT }}
3447
KEY: ${{ secrets.SSHKEY }}
35-
source: ./typescript-version/dist
48+
source: ${{ env.BRAND_NAME }}/vue-free/typescript-version/dist
3649
target: ${{ secrets.PROD_DIR }}/demo
37-
38-
# remove target folder before uploading data
3950
rm: true
40-
41-
# Setting it to `1` will upload all the files inside "dist" dir instead of "dist" dir itself
42-
strip_components: 3
51+
strip_components: 4

0 commit comments

Comments
 (0)