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 name: Node.js CI
run-name: ${{ github.actor }} is testing out GitHub Actions 🚀
on: [push] on: [push]
jobs: jobs:
Explore-GitHub-Actions: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- run: echo "🎉 The job was automatically triggered by a ${{ github.event_name }} event." - name: Checkout code
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!" uses: actions/checkout@v2
- run: echo "🔎 The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code - name: Use Node.js
uses: actions/checkout@v3 uses: actions/setup-node@v2
- run: echo "💡 The ${{ github.repository }} repository has been cloned to the runner." with:
- run: echo "🖥️ The workflow is now ready to test your code on the runner." node-version: 14
- name: List files in the repository
- name: Install dependencies
run: | run: |
ls ${{ github.workspace }} npm ci
- run: echo "🍏 This job's status is ${{ job.status }}."
- 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, "semi": true,
"trailingComma": "all", "trailingComma": "all",
"singleQuote": true, "singleQuote": true,
"printWidth": 90, "printWidth": 80,
"plugins": ["prettier-plugin-jsdoc"] "plugins": ["prettier-plugin-jsdoc"]
} }