-
Notifications
You must be signed in to change notification settings - Fork 424
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'v2' of https://github.com/langhuihui/jessibuca into v2
- Loading branch information
Showing
1 changed file
with
25 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,16 @@ | |
|
||
name: CI | ||
|
||
# Controls when the action will run. | ||
# Controls when the action will run. | ||
on: | ||
# Triggers the workflow on push or pull request events but only for the v2 branch | ||
push: | ||
branches: [ v2 ] | ||
pull_request: | ||
branches: [ v2 ] | ||
create: | ||
tags: | ||
- v* | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
@@ -24,16 +27,24 @@ jobs: | |
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js environment | ||
uses: actions/[email protected] | ||
with: | ||
# Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0 | ||
node-version: 14.x | ||
|
||
|
||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
env: | ||
cache-name: cache-node-modules | ||
with: | ||
path: node_modules | ||
key: ${{ env.cache-name }}-${{ hashFiles('**/package.json') }} | ||
|
||
- name: npm install | ||
run: npm install | ||
|
||
- name: build | ||
run: npm run build:demo | ||
|
||
|
@@ -45,3 +56,13 @@ jobs: | |
host: monibuca.com | ||
username: root | ||
privateKey: ${{ secrets.PEM }} | ||
|
||
- name: zip | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: zip -r ./demo.zip demo/public/* | ||
|
||
- name: Release | ||
uses: softprops/action-gh-release@v1 | ||
if: startsWith(github.ref, 'refs/tags/') | ||
with: | ||
files: "demo.zip" |