Skip to content

[WIP]init sks

[WIP]init sks #324

Workflow file for this run

name: vercel deploy
on:
push:
branches:
- master
pull_request:
jobs:
vercel-deploy:
runs-on: ubuntu-latest
steps:
- name: global-setting
run: npm install -g [email protected]
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: 'npm'
- uses: actions/cache@v2
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: build
env:
NODE_OPTIONS: "--max-old-space-size=8192"
run: yarn && yarn build
- name: set up pr preview
uses: amondnet/vercel-action@v25
id: vercel-action-staging
if: github.event_name == 'pull_request'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./
- name: set up production
uses: amondnet/vercel-action@v25
id: vercel-action-production
if: github.event_name == 'push'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
vercel-token: ${{ secrets.VERCEL_TOKEN }}
vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
working-directory: ./
vercel-args: '--prod'
- name: upload to cdn
uses: wlixcc/[email protected]
if: github.event_name == 'push'
with:
username: ${{ secrets.SFTP_USERNAME }}
server: ${{ secrets.SFTP_SERVER }}
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
local_path: './cloudtower-api-doc/build/*'
remote_path: '/uploads/code-site'
sftp_only: true