Skip to content

Commit

Permalink
fix(action):
Browse files Browse the repository at this point in the history
  • Loading branch information
h7ml committed Jun 15, 2022
1 parent 7ed215a commit f33c8b3
Showing 1 changed file with 14 additions and 37 deletions.
51 changes: 14 additions & 37 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,51 +9,28 @@ env:
TZ: Asia/Shanghai

jobs:
build:
name: build 🚀
sync:
name: sync gitee 🚀
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ latest,current,stable ]
steps:
- name: Checkout 🚀
uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }} 🚀
uses: actions/setup-node@v2
- name: Cache yarn modules 🚀
uses: actions/cache@v2
env:
cache-name: cache-yarn-modules
- name: Sync vue-amis-sdk 🚀
uses: Yikun/hub-mirror-action@master
with:
path: '**/node_modules'
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
- name: Install dependencies 🚀
run: yarn install
- name: Generate files 🚀
run: yarn build
src: github/h7ml
dst: gitee/h7ml
dst_key: ${{ secrets.PRIVATE_KEY }}
dst_token: ${{ secrets.GIT_TOKEN }}
static_list: "vue-amis-sdk"
needs: sync

sync:
name: sync gitee 🚀
runs-on: ubuntu-latest
steps:
- name: Checkout 🚀
uses: actions/checkout@v2
- name: Sync vue-amis-sdk 🚀
uses: Yikun/hub-mirror-action@master
with:
src: github/h7ml
dst: gitee/h7ml
dst_key: ${{ secrets.PRIVATE_KEY }}
dst_token: ${{ secrets.GIT_TOKEN }}
static_list: "vue-amis-sdk"
deploy:
name: deploy 🚀
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [ latest ]
node-version: [latest]
steps:
- name: Checkout 🚀
uses: actions/checkout@v2
Expand All @@ -64,7 +41,7 @@ jobs:
env:
cache-name: cache-yarn-modules
with:
path: '**/node_modules'
path: "**/node_modules"
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-${{ matrix.node-version }}-
Expand All @@ -86,8 +63,8 @@ jobs:
- name: Deploy to surge 🚀
uses: dswistowski/surge-sh-action@v1
with:
domain: 'vue-amis-sdk.surge.sh'
project: './dist'
domain: "vue-amis-sdk.surge.sh"
project: "./dist"
login: ${{ secrets.surge_login }}
token: ${{ secrets.surge_token }}
- name: Upload surge service and generate preview URL 🚀
Expand Down

0 comments on commit f33c8b3

Please sign in to comment.