From 642a26fb1691f88944f1024aec6c2319b482e61b Mon Sep 17 00:00:00 2001 From: madjin <32600939+madjin@users.noreply.github.com> Date: Thu, 14 Dec 2023 19:18:35 -0500 Subject: [PATCH] update github action --- .github/workflows/main.yml | 74 ++++++++++++++------------------------ 1 file changed, 26 insertions(+), 48 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4656911e..87a6c9ba 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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/repo-visualizer@0.9.1 - - - 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 +