This commit is contained in:
ciaochaos 2020-05-01 13:44:08 +08:00
parent f0e23f8c9f
commit fa6de870f1
2 changed files with 36 additions and 24 deletions

View File

@ -1,26 +1,32 @@
name: Continuous Integration #action名称
on: [push] #在推送的时候运行此action
on:
push:
branches:
- master
jobs:
build_job:
runs-on: ubuntu-latest #运行环境
name: build
build:
runs-on: ubuntu-latest
steps:
# check out the repository
- name: Checkout
uses: actions/checkout@v2 #这里使用了github官方提供的action,checkout项目到虚拟机上
- name: Checkout master
uses: actions/checkout@v2
with:
ref: master
- name: Install Dependencies
run: yarn
- name: Build
run: yarn build
- name: Setup node
uses: actions/setup-node@v1
with:
node-version: "12.x"
- name: Build project
run: yarn && yarn build
# 使用云开发 Github Action 部署
- name: Upload COS
uses: zkqiang/tencent-cos-action@master
with:
args: delete -r -f / && upload -r ./dist/ /
secret_id: ${{ secrets.SECRET_ID }}
secret_key: ${{ secrets.SECRET_KEY }}
bucket: ${{ secrets.BUCKET }}
region: ap-shanghai
uses: zkqiang/tencent-cos-action@master
with:
args: delete -r -f / && upload -r ./dist/ /
secret_id: ${{ secrets.SECRET_ID }}
secret_key: ${{ secrets.SECRET_KEY }}
bucket: ${{ secrets.BUCKET }}
region: ap-shanghai

View File

@ -12,7 +12,6 @@
<component name="ChangeListManager">
<list default="true" id="78c692f3-8e9f-49c7-86c1-0c5e9d711b1f" name="Default Changelist" comment="0.1.0.1">
<change beforePath="$PROJECT_DIR$/.github/workflows/nodejs.yml" beforeDir="false" afterPath="$PROJECT_DIR$/.github/workflows/nodejs.yml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
</list>
<option name="SHOW_DIALOG" value="false" />
<option name="HIGHLIGHT_CONFLICTS" value="true" />
@ -77,7 +76,7 @@
<option name="presentableId" value="Default" />
<updated>1588240852207</updated>
<workItem from="1588240855414" duration="15673000" />
<workItem from="1588305721761" duration="3661000" />
<workItem from="1588305721761" duration="3797000" />
</task>
<task id="LOCAL-00001" summary="0.1.0.1">
<created>1588308749650</created>
@ -107,7 +106,14 @@
<option name="project" value="LOCAL" />
<updated>1588309902902</updated>
</task>
<option name="localTasksCounter" value="5" />
<task id="LOCAL-00005" summary="0.1.0.1">
<created>1588311660483</created>
<option name="number" value="00005" />
<option name="presentableId" value="LOCAL-00005" />
<option name="project" value="LOCAL" />
<updated>1588311660483</updated>
</task>
<option name="localTasksCounter" value="6" />
<servers />
</component>
<component name="TypeScriptGeneratedFilesManager">
@ -134,10 +140,10 @@
<screen x="0" y="23" width="2541" height="1057" />
</state>
<state x="1161" y="421" key="#Notifications/428.1103.1680.1027/0.23.2541.1057/-1600.203.1600.877@0.23.2541.1057" timestamp="1588307553058" />
<state x="870" y="291" key="Vcs.Push.Dialog.v2" timestamp="1588309965881">
<state x="870" y="291" key="Vcs.Push.Dialog.v2" timestamp="1588311665254">
<screen x="0" y="23" width="2541" height="1057" />
</state>
<state x="870" y="291" key="Vcs.Push.Dialog.v2/428.1103.1680.1027/0.23.2541.1057/-1600.203.1600.877@0.23.2541.1057" timestamp="1588309965881" />
<state x="870" y="291" key="Vcs.Push.Dialog.v2/428.1103.1680.1027/0.23.2541.1057/-1600.203.1600.877@0.23.2541.1057" timestamp="1588311665254" />
<state x="997" y="347" key="git4idea.merge.GitPullDialog" timestamp="1588309763146">
<screen x="0" y="23" width="2541" height="1057" />
</state>