Skip to content

build: Setup @relative-ci/agent #14

build: Setup @relative-ci/agent

build: Setup @relative-ci/agent #14

Workflow file for this run

name: build
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# Cache packages when the branch is not update-dependencies or dependabot/*
- name: Resolve caching
id: cache
if: ${{ github.ref_name != 'update-dependencies' && !startsWith(github.ref_name, 'dependabot/') }}
run: echo "PACKAGE=npm" >> $GITHUB_OUTPUT
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
cache: ${{ steps.cache.outputs.PACKAGE }}
# Install dependencies
- run: npm ci
# Build and output webpack stats to artifacts/webpack-stats.json
- run: npm run build
working-directory: app
env:
RELATIVE_CI_KEY: ${{ secrets.RELATIVE_CI_KEY }}
RELATIVE_CI_SLUG: "relative-ci/incorrect-slug"
DEBUG: relative-ci:agent
- name: Archive production artifacts
uses: actions/upload-artifact@v2
with:
name: test-artifacts
path: |
artifacts/webpack-stats.json