Skip to content

feat: ensure all files in project are inactive when app loaded #939

feat: ensure all files in project are inactive when app loaded

feat: ensure all files in project are inactive when app loaded #939

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: ['main', 'master', 'feat/*', 'fix/*']
tags:
- 'v*'
pull_request:
branches: ['main', 'master', 'feat/*', 'fix/*']
permissions:
contents: write
pages: write
id-token: write
pull-requests: write
jobs:
validate_and_build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install Dependencies
run: npm ci
- name: Install Prettier
run: npm install --save-dev --save-exact prettier
- name: Run ESLint
run: npx eslint src --ext .js
- name: Run Stylelint
run: npx stylelint "**/*.css" --config stylelint.config.mjs
- name: Run Prettier Check
run: npx prettier --check .
- name: Run tests
run: npm test
env:
NODE_OPTIONS: '--experimental-vm-modules'
- name: Run tests with coverage
run: npm run test:coverage
env:
NODE_OPTIONS: '--experimental-vm-modules'
- name: Coverage report
if: "!startsWith(github.ref, 'refs/tags/v')"
uses: romeovs/lcov-reporter-action@v0.3.1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
lcov-file: ./coverage/lcov.info
- name: Build Application
run: |
npx vite build --base ./
- name: ZIP Build Artifacts
if: startsWith(github.ref, 'refs/tags/v')
run: zip -r release-build.zip dist/
- name: Create Release
uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/v')
with:
name: Release ${{ github.ref_name }}
files: |
release-build.zip
draft: false
prerelease: false
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: './dist'
deploy:
needs: validate_and_build
if: startsWith(github.ref, 'refs/tags/v')
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4