Skip to content

relative-ci/example-vite-github-action

Repository files navigation

RelativeCI agent GitHub action setup example for Vite

RelativeCI

Install

@relative-ci/agent

npm install --dev @relative-ci/agent

or

yarn add --dev @relative-ci/agent

rollup-plugin-webpack-stats

npm install --dev rollup-plugin-webpack-stats

or

yarn add --dev rollup-plugin-webpack-stats

Configure

rollup-plugin-webpack-stats

Output Vite stats JSON with a webpack stats structure supported by @relative-ci/agent

// vite.config.js
import { defineConfig } from 'vite';
import { webpackStats } from 'rollup-plugin-webpack-stats';

export default defineConfig((env) => ({
  plugins: [
    // Output webpack-stats.json file
    webpackStats(),
  ],
}));

Configure @relative-ci/agent GitHub action

# .github/workflow/build.yml
name: Build
on: push
jobs:
  build:
    steps:
    - name: Build application & bundle stats 
      run: npm run build

    - name: Send bundle stats and build information to RelativeCI
      uses: relative-ci/agent-action@v2
      with:
        key: ${{ secrets.RELATIVE_CI_KEY }}
        webpackStatsFile: ./webpack-stats.json

Read more

About

@relative-ci/agent GitHub action setup example for Vite

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published