End Console #28
Workflow file for this run
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
# This is a basic workflow to help you get started with Actions | |
name: CI | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
# branches: [ master ] | |
tags: | |
- v1.** | |
# pull_request: | |
# branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "server" | |
server: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: setup node | |
uses: actions/setup-node@v3.8.1 | |
with: | |
# Set always-auth in npmrc | |
# always-auth: # optional, default is false | |
# Version Spec of the version to use. Examples: 12.x, 10.15.1, >=10.15.0 | |
# node-version: # optional | |
node-version: '>=10.15.0' | |
# Target architecture for Node to use. Examples: x86, x64. Will use system architecture by default. | |
# architecture: # optional | |
# Set this option if you want the action to check for the latest available version that satisfies the version spec | |
# check-latest: # optional | |
# Optional registry to set up for auth. Will set the registry in a project level .npmrc and .yarnrc file, and set up auth to read in from env.NODE_AUTH_TOKEN | |
# registry-url: # optional | |
# Optional scope for authenticating against scoped registries | |
# scope: # optional | |
# Used to pull node distributions from node-versions. Since there's a default, this is typically not supplied by the user. | |
# token: # optional, default is ${{ github.token }} | |
# Deprecated. Use node-version instead. Will not be supported after October 1, 2019 | |
# version: # optional | |
- name: 'start server(启动正向代理!!)' | |
run: node server/server.js | |
- name: End Console | |
run: echo node server run successful! | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Checkout | |
uses: actions/checkout@v2 | |
# Runs a single command using the runners shell | |
- name: Run a one-line script | |
run: echo Hello, world! | |
- name: Install and Build | |
run: | | |
npm install -g cnpm -registry=https://registry.npm.taobao.org | |
cnpm install | |
npm run build | |
- name: Deploy | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: dist | |
BUILD_SCRIPT: cnpm install && npm run build | |