-
Notifications
You must be signed in to change notification settings - Fork 328
41 lines (39 loc) · 1.03 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
name: Build & Deploy
on:
push:
branches:
- deploy/**
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup Node version 16.19.0
uses: actions/setup-node@v3
with:
node-version: '16.19.0'
check-latest: true
- name: Yarn install, webpacking
run: |
yarn install --ignore-scripts
yarn webpack:prod
- name: Execute build.sh
run: |
chmod +x ./scripts/build.sh
./scripts/build.sh
- name: Execute deploy.sh
run: |
chmod +x ./scripts/deploy.sh
./scripts/deploy.sh
- name: Define branch name
id: target_branch
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF##*/})"
- name: Push Changes in build-base
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
force: true
directory: ./build-base
branch: dist/${{ steps.target_branch.outputs.branch }}