Skip to content

fix: fix api url

fix: fix api url #10

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
name: Node.js CI
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
steps: # 构建任务的步骤,一个任务可分为多个步骤
# 步骤1 拉取仓库代码
- name: Checkout # 步骤名称
uses: actions/checkout@v2
# 步骤2 给当前服务器安装node
- name: use node
uses: actions/setup-node@v2
with:
node-version: 16 # node版本
cache: "npm"
# 步骤3 下载项目依赖
- name: install
run: npm install
# 步骤4 打包node项目
- name: build
run: npm run build # 此处是你node项目的构建脚本
# 步骤5 部署项目
- name: deploy
uses: JamesIves/[email protected]
with:
repository-name: pkjy/pkjy.github.io
# 供用户访问的github access_token 下面的变量是在准备阶段自定义的变量
token: ${{ secrets.ACCESS_TOKEN }}
# 发布到指定分支
branch: master
# 指定发布的打包后的文件
folder: dist