-
Notifications
You must be signed in to change notification settings - Fork 25
47 lines (40 loc) · 1.31 KB
/
build.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
38
39
40
41
42
43
44
45
46
47
name: Build Package
on:
workflow_dispatch:
jobs:
deploy:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get Branch Name
uses: nelonoel/[email protected]
- run: echo "BRANCH_NAME=${BRANCH_NAME}" >> $GITHUB_ENV
- name: Build & Deploy GPM Package
uses: appleboy/[email protected]
env:
BRANCH: ${{ env.BRANCH_NAME }}
with:
command_timeout: 20m
host: ${{ secrets.DEPLOY_HOST }}
key: ${{ secrets.DEPLOY_KEY }}
username: ${{ secrets.DEPLOY_USER }}
envs: BRANCH
script_stop: true
script: |
cd /www/pkgs/fred/
git add .
git stash
git fetch origin
git checkout -f $BRANCH
git pull origin $BRANCH
cd /www/pkgs/fred/core/components/fred/
/home/.bin/composer install --no-dev
cd /www/pkgs/fred/
npm install
npm run build
rm -rf _packages
/www/pkgs/gpm/cli/bin/gpm package:update --pkg fred --updateDB=alter
/www/pkgs/gpm/cli/bin/gpm package:build --pkg fred