format deploy.yml #42
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: Build | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: | |
- dev | |
- test | |
- sit | |
- uat | |
- pre | |
- gray | |
- sim | |
- fat | |
- prod | |
- master | |
- main | |
- dr | |
pull_request: | |
branches: | |
- master | |
- main | |
paths-ignore: | |
- '**/*.md' | |
- '**/*.txt' | |
- '**/*.keep' | |
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | |
permissions: | |
contents: read | |
pages: write | |
id-token: write | |
# Allow one concurrent deployment | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# Build Job | |
build: | |
name: Test it On ${{ matrix.os }} and node-${{ matrix.node-version }} | |
# The type of runner that the job will run on | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
max-parallel: 8 | |
matrix: | |
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/ | |
# See supported Node.js release schedule at https://nodejs.org/zh-cn/download/releases/ | |
node-version: | |
- "18.x" | |
- "20.x" | |
- "22.x" | |
os: | |
- "ubuntu-latest" | |
- "macos-latest" | |
- "windows-latest" | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: 9 | |
- name: Use Node.js ${{ matrix.node-version }} environment in ${{ matrix.os }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'pnpm' | |
registry-url: "https://npm.pkg.github.com/" | |
- name: Install dependencies | |
run: pnpm install --frozen-lockfile | |
- name: Check validation | |
run: | | |
pnpm run build |