add action to install deps and run prettier

This commit is contained in:
Aaron William Po
2023-02-09 02:32:28 -05:00
parent c2eb4d1371
commit e654216c1a
2 changed files with 21 additions and 14 deletions

View File

@@ -1,18 +1,25 @@
name: GitHub Actions Demo
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
name: Node.js CI
on: [push]
jobs:
Explore-GitHub-Actions:
build:
runs-on: ubuntu-latest
steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v3
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "🖥️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
- name: Checkout code
uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 14
- name: Install dependencies
run: |
ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."
npm ci
- name: Prettier Action
# You may pin to the exact commit or the version.
# uses: creyD/prettier_action@6602189cf8bac1ce73ffe601925f6127ab7f21ac
uses: creyD/prettier_action@v4.2

View File

@@ -2,6 +2,6 @@
"semi": true,
"trailingComma": "all",
"singleQuote": true,
"printWidth": 90,
"printWidth": 80,
"plugins": ["prettier-plugin-jsdoc"]
}