Skip to content

news日期和正文 #44

news日期和正文

news日期和正文 #44

Workflow file for this run

# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Lint and Format
on:
push:
branches: [main]
jobs:
lint-format:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
# cache: 'yarn'
- name: Install dependencies
run: yarn
- name: Lint source files
run: yarn lint
- name: Format source files
run: yarn format
- name: Configure git remote with PAT
run: |
git remote set-url origin https://x-access-token:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/Qiujianrong/Qiujianrong.github.io.git
- name: Commit any changes due to lint and format
# You may pin to the exact commit or the version.
# uses: EndBug/add-and-commit@2bdc0a61a03738a1d1bda24d566ad0dbe3083d87
uses: EndBug/add-and-commit@v9
with:
add: .
author_name: GitHub Action
message: changes by lint&format script [skip ci]
push: origin main
github_token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
env:
GITHUB_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}