From 75218dc31caf82a1105b43faa76de90bce41c043 Mon Sep 17 00:00:00 2001 From: Prab <54489997+NotPrab@users.noreply.github.com> Date: Thu, 30 Jan 2025 18:10:11 +0700 Subject: [PATCH 1/3] add deploy-vue --- .github/workflows/deploy-vue.yml | 39 ++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/deploy-vue.yml diff --git a/.github/workflows/deploy-vue.yml b/.github/workflows/deploy-vue.yml new file mode 100644 index 00000000..1e2d9ddc --- /dev/null +++ b/.github/workflows/deploy-vue.yml @@ -0,0 +1,39 @@ +name: deploy vue + +on: + push: + branches: + - master + +jobs: + deploy-app: + runs-on: ubuntu-latest + steps: + - name: check out the code to build server + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + with: + version: 10 + run_install: false + + - name: Use Node.js 20.x + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + + - name: build the code + run: | + pnpm install --no-frozen-lockfile + pnpm build + + - name: copy file to server + uses: appleboy/scp-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.SSH_USER_NAME }} + key: ${{ secrets.SSH_KEY }} + source: "./dist/**" + target: "/var/www/html" + strip_components: 1 \ No newline at end of file From 2877a2131e32ec37467819f74d4a01fa4f9859a7 Mon Sep 17 00:00:00 2001 From: Prab <54489997+NotPrab@users.noreply.github.com> Date: Thu, 30 Jan 2025 18:24:20 +0700 Subject: [PATCH 2/3] add deploy-prod and change my name --- .github/workflows/deploy-vue-prod.yml | 39 +++++++++++++++++++++++++++ index.html | 2 +- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deploy-vue-prod.yml diff --git a/.github/workflows/deploy-vue-prod.yml b/.github/workflows/deploy-vue-prod.yml new file mode 100644 index 00000000..c87c6669 --- /dev/null +++ b/.github/workflows/deploy-vue-prod.yml @@ -0,0 +1,39 @@ +name: deploy vue + +on: + push: + branches: + - prod + +jobs: + deploy-app: + runs-on: ubuntu-latest + steps: + - name: check out the code to build server + uses: actions/checkout@v4 + + - uses: pnpm/action-setup@v4 + with: + version: 10 + run_install: false + + - name: Use Node.js 20.x + uses: actions/setup-node@v4 + with: + node-version: 20 + cache: 'pnpm' + + - name: build the code + run: | + pnpm install --no-frozen-lockfile + pnpm build + + - name: copy file to server + uses: appleboy/scp-action@master + with: + host: ${{ secrets.HOST }} + username: ${{ secrets.SSH_USER_NAME }} + key: ${{ secrets.SSH_KEY }} + source: "./dist/**" + target: "/var/www/html" + strip_components: 1 \ No newline at end of file diff --git a/index.html b/index.html index 08e2c793..98431bf3 100644 --- a/index.html +++ b/index.html @@ -2,7 +2,7 @@
-