Merge pull request #2 from TurboHsu/main #20
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
name: Tencent Cloud Base Deploy | |
on: | |
push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Cache node modules | |
id: cache-npm | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install dependency and build | |
run: | | |
corepack enable | |
pnpm i | |
pnpm build | |
- name: Push to Cloudbase | |
uses: TencentCloudBase/[email protected] | |
with: | |
# 云开发 secretId | |
secretId: ${{SECRETS.SID}} | |
# 云开发 secretKey | |
secretKey: ${{SECRETS.SKEY}} | |
# 云开发环境 Id | |
envId: ${{SECRETS.ENVID}} |