Skip to content

Commit

Permalink
chore: deploy workflow added
Browse files Browse the repository at this point in the history
  • Loading branch information
jd-solanki committed Feb 26, 2024
1 parent fe47cb5 commit 7cfd25b
Showing 1 changed file with 47 additions and 0 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/deploy-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: 🚀 Deploy - Demo

on:
workflow_dispatch:
push:
branches:
- main

jobs:
deployment:
runs-on: ubuntu-latest
env:
NUXT_APP_BASE_URL: ${{ secrets.NUXT_APP_BASE_URL }}
steps:
- name: ⚙️ Setup pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: ⬇️ Checkout template
uses: actions/checkout@v4

- name: 📦 Generate demo
working-directory: typescript-version
run: pnpm i && pnpm generate

- name: 🗄️ Ensure Dir on server
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.SSHKEY }}
script: |
mkdir -p ${{ secrets.PROD_DIR }}
- name: 🚀 Upload demo zip
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
port: ${{ secrets.PORT }}
key: ${{ secrets.SSHKEY }}
source: typescript-version/.output/public
target: ${{ secrets.PROD_DIR }}
strip_components: 3
rm: true

0 comments on commit 7cfd25b

Please sign in to comment.