移除天气、短信等取消的内容 #33
This file contains hidden or 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
name: auto-deploy | |
on: | |
push: | |
branches: [typescript] | |
jobs: | |
archive-file: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: get version | |
id: version | |
uses: notiz-dev/github-action-json-property@release | |
with: | |
path: 'package.json' | |
prop_path: 'version' | |
- name: get current time | |
uses: 1466587594/get-current-time@v2 | |
id: current-time | |
with: | |
format: YYYY.MM.DD | |
utcOffset: "+08:00" | |
- name: action-zip | |
uses: montudor/[email protected] | |
with: | |
args: zip -qq -r blinker-js-typescript-${{steps.version.outputs.prop}}.zip . -x .github/* -x .git/* | |
- name: create json | |
id: jsonfile | |
uses: jsdaniell/[email protected] | |
with: | |
name: "nodejs.json" | |
json: '{"img": "assets/sdk/nodejs.png", "text": "NodeJs (TypeScript)", "update": "${{ steps.current-time.outputs.formattedTime}}", "version": "${{steps.version.outputs.prop}}", "github": "https://github.com/blinker-iot/blinker-js", "document": "https://diandeng.tech/doc/javascript-support", "download": "sdk/blinker-js-typescript-${{steps.version.outputs.prop}}.zip" }' | |
- name: upload zip | |
uses: garygrossgarten/github-action-scp@release | |
with: | |
local: blinker-js-typescript-${{steps.version.outputs.prop}}.zip | |
remote: ${{ secrets.REMOTE_PATH }}/blinker-js-typescript-${{steps.version.outputs.prop}}.zip | |
host: ${{ secrets.SERVER_IP }} | |
username: ubuntu | |
password: ${{ secrets.SERVER_PASSWD }} | |
recursive: true | |
- name: upload json | |
uses: garygrossgarten/github-action-scp@release | |
with: | |
local: nodejs.json | |
remote: ${{ secrets.REMOTE_PATH }}/nodejs.json | |
host: ${{ secrets.SERVER_IP }} | |
username: ubuntu | |
password: ${{ secrets.SERVER_PASSWD }} | |
recursive: true |