-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
26 additions
and
48 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,32 @@ | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
# When someone push or merge a pull request | ||
# inside the main branch | ||
push: | ||
# branches: | ||
# - main | ||
# When someone create a pull request from | ||
# the main branch | ||
pull_request: | ||
branches: | ||
- main | ||
- main # or the branch you want to trigger the deployment on | ||
|
||
jobs: | ||
check-quality: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
name: Running Code Quality Analysis | ||
|
||
steps: | ||
- name: Configure GH Checkout | ||
# Ready-to-use action made by GH or third party | ||
# companies | ||
# We can recognize the GH actions from the third party | ||
# ones checking the name prefix. | ||
# `actions/` = GH | ||
# `something-else/` = third party | ||
# This is a GH ready-to-use action | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Node Modules | ||
# Run the lint custom NPM command that triggers the | ||
# ESLint linter check | ||
run: npm install --force | ||
|
||
- name: Run ESLint | ||
# Run the lint custom NPM command that triggers the | ||
# ESLint linter check | ||
run: npm run lint:js | ||
|
||
- name: Repo Visualizer | ||
uses: githubocto/[email protected] | ||
|
||
- name: Check code meets quality standards | ||
id: code-inspector | ||
uses: codeinspectorio/github-action@master | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
code_inspector_api_token: ${{ secrets.CODE_INSPECTOR_API_TOKEN }} | ||
force_ref: 'none' | ||
min_quality_grade: 'WARNING' | ||
min_quality_score: '50' | ||
max_defects_rate: '0.0001' | ||
max_complex_functions_rate: '0.0001' | ||
max_long_functions_rate: '0.0001' | ||
project_name: '' | ||
max_timeout_sec: '600' | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18' # or the version you need | ||
|
||
- name: Install dependencies | ||
run: npm install --legacy-deps | ||
|
||
- name: Build | ||
run: npm run build | ||
|
||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
deploy_key: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./dist | ||
|