Eventvisor

Workflow

Deployment

Once the datafiles are built, you can deploy them either to a CDN (recommended), or to your own server, or even along with your application.

Unopinionated architecture

Eventvisor itself does not dictate how you should deploy your datafiles.

You can either:

  • Deploy the datafiles to a CDN (recommended)
  • Deploy the datafiles to your own server, or
  • Deploy the datafiles along with your application code

The last option is possible but definitely not recommended, because one of the key benefits of Eventvisor is to be able to remotely control the flow of tracked events from your applications. Coupling the datafiles deployment with your application code defeats that purpose.

Steps involved

Ideally you should have your Eventvisor project in a separate Git repository with its own CI/CD pipeline. Like hosting on GitHub using GitHub Actions.

The deployment workflow would look like this:

Linting

First check if the project is linting successfully:

Command
$ npx eventvisor lint

Testing

See if all your test specs are passing:

Command
$ npx eventvisor test

Build the datafiles

Next build the datafiles:

Command
$ npx eventvisor build

If you don't care about incremental revision numbers for the generated datafiles, do:

Command
$ npx eventvisor build --revision-from-hash

This will significantly help with caching purposes.

Commit system files

If incremental revision numbers are important to you, commit the system files in .eventvisor directory to your Git repository:

Command
$ git add .eventvisor/*
$ git commit -m "[skip ci] Revision $(cat .eventvisor/REVISION)"

If you are building datafiles using --revision-from-hash flag, you can skip this step.

Upload to your CDN

This is where you take care of uploading the datafiles to your CDN, or any other storage of your choosing.

Push commits back to upstream

Only if you were interested in maintaining incremental revision numbers, push the commits back to your upstream repository:

Command
$ git push

If using --revision-from-hash flag when building datafiles, you can skip this step.

Examples

See guides for GitHub Actions and Cloudflare Pages.

Previous
Testing
Next
SDKs