GitHub Actions

This chapter shows how to integrate with FeaturePeek when using GitHub Actions workflows as Continuous Integration.

Prerequisite: You should create a FeaturePeek account and configure your peek.yml file before following the steps in this chapter.

Example config file

If you already have your config file set up, simply append the FeaturePeek CI command after your build phase.

If you don't have your config file set up yet, read some of the help articles provided by GitHub to get started.

Add a yml file inside your repo's /.github/workflows/ directory that fires on the push event. The file should look something like this:

# /.github/workflows/featurepeek.yml
name: Build and Ping FeaturePeek
on: push
runs-on: ubuntu-latest
node-version: [12.x]
- uses: actions/[email protected]
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-[email protected]
node-version: ${{ matrix.node-version }}
- name: Cache node modules
uses: actions/[email protected]
path: node_modules
key: ${{ runner.OS }}-build-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.OS }}-build-${{ env.cache-name }}-
${{ runner.OS }}-build-
${{ runner.OS }}-
- name: Install dependencies
run: yarn
- name: Build frontend assets
run: yarn build
- name: Ping FeaturePeek
run: bash <(curl -s
CI: true

Note: The command in the snippet above is just for static builds — if you are building a Docker image, you'll need to pass in more arguments.

Sample code repo

You can search the FeaturePeek org on GitHub to find sample repos of frontends that integrate FeaturePeek with GitHub Actions. Be sure to visit the open pull requests to find links to running public FeaturePeek deployments.

Try it out

Try opening a new pull request that contain the changes in this chapter. When your CI finishes successfully, you should see the FeaturePeek bot comment a link on your pull request. If not, consult our Troubleshooting section.