Skip to content

Commit 0c64fe2

Browse files
committed
chore: automate build process
1 parent e3eb3a2 commit 0c64fe2

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/build.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Build Package
2+
3+
on:
4+
workflow_dispatch:
5+
6+
jobs:
7+
8+
deploy:
9+
# The type of runner that the job will run on
10+
runs-on: ubuntu-latest
11+
12+
# Steps represent a sequence of tasks that will be executed as part of the job
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
- name: Get Branch Name
18+
uses: nelonoel/[email protected]
19+
20+
- run: echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV
21+
22+
- name: Build & Deploy GPM Package
23+
uses: appleboy/[email protected]
24+
env:
25+
BRANCH: ${{ env.BRANCH_NAME }}
26+
with:
27+
command_timeout: 20m
28+
host: ${{ secrets.DEPLOY_HOST }}
29+
key: ${{ secrets.DEPLOY_KEY }}
30+
username: ${{ secrets.DEPLOY_USER }}
31+
envs: BRANCH
32+
script_stop: true
33+
script: |
34+
cd /www/pkgs/modai/
35+
git add .
36+
git stash
37+
git fetch origin
38+
git checkout -f $BRANCH
39+
git pull origin $BRANCH
40+
cd /www/pkgs/modai/core/components/modai/
41+
/home/.bin/composer install --no-dev
42+
cd /www/pkgs/modai/
43+
rm -rf _packages
44+
/www/pkgs/gpm/bin/gpm modai:update --alterDB
45+
/www/pkgs/gpm/bin/gpm modai:build

0 commit comments

Comments
 (0)