Skip to content

Commit b65a994

Browse files
committed
ci: deploy-demos workflow added
1 parent adc9478 commit b65a994

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

.github/workflows/deploy-demos.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: 🚀 Deploy Demos
2+
3+
on: [workflow_dispatch]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- name: ⚙️ Set BRAND_NAME environment variable from repo name
10+
run: echo BRAND_NAME=${{ github.event.repository.name }} | cut -d '-' -f1 >> $GITHUB_ENV
11+
12+
- name: ⬇️ Checkout template
13+
uses: actions/checkout@v3
14+
15+
- name: ⬇️ Install packages
16+
run: yarn install
17+
working-directory: ./typescript-version
18+
19+
- name: 📦 Generate demo
20+
run: yarn build --base=/${{ env.BRAND_NAME }}-vuetify-vuejs-admin-template-free/demo/
21+
working-directory: ./typescript-version
22+
23+
- name: 🚀 Upload demo
24+
uses: appleboy/scp-action@master
25+
env:
26+
HOST: ${{ secrets.HOST }}
27+
USERNAME: ${{ secrets.USERNAME }}
28+
PORT: ${{ secrets.PORT }}
29+
KEY: ${{ secrets.SSHKEY }}
30+
with:
31+
source: ./typescript-version/dist
32+
target: ${{ secrets.PROD_DIR }}/demo
33+
34+
# remove target folder before uploading data
35+
rm: true
36+
37+
# Setting it to `1` will upload all the files inside "dist" dir instead of "dist" dir itself
38+
strip_components: 1

0 commit comments

Comments
 (0)