-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (29 loc) 路 1.15 KB
/
deploy-demos.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: 馃殌 Deploy Demo
on: [workflow_dispatch]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: 鈿欙笍 Set BRAND_NAME environment variable from repo name
run: echo BRAND_NAME=${{ github.event.repository.name }} | cut -d '-' -f1 >> $GITHUB_ENV
- name: 猬囷笍 Checkout template
uses: actions/checkout@v3
- name: 猬囷笍 Install packages
run: yarn install
working-directory: ./typescript-version
- name: 馃摝 Generate demo
run: yarn build --base=/${{ env.BRAND_NAME }}-vuetify-vuejs-admin-template-free/demo/
working-directory: ./typescript-version
- name: 馃殌 Upload demo
uses: appleboy/scp-action@master
with:
HOST: ${{ secrets.HOST }}
USERNAME: ${{ secrets.USERNAME }}
PORT: ${{ secrets.PORT }}
KEY: ${{ secrets.SSHKEY }}
source: ./typescript-version/dist
target: ${{ secrets.PROD_DIR }}/demo
# remove target folder before uploading data
rm: true
# Setting it to `1` will upload all the files inside "dist" dir instead of "dist" dir itself
strip_components: 3