feat: use snapshotted demo data, make independent of backend #1196
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test and Build | |
on: | |
push: | |
branches: [main, staging] | |
pull_request: | |
branches: [main, staging] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
environment: Preview | |
env: | |
NEXT_PUBLIC_TREE_TILES_URL: ${{secrets.NEXT_PUBLIC_TREE_TILES_URL}} | |
NEXT_PUBLIC_MAPTILER_BASEMAP_URL: ${{secrets.NEXT_PUBLIC_MAPTILER_BASEMAP_URL}} | |
NEXT_PUBLIC_MATOMO_URL: ${{secrets.NEXT_PUBLIC_MATOMO_URL}} | |
NEXT_PUBLIC_BASE_URL: ${{secrets.NEXT_PUBLIC_BASE_URL}} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Use Node.js (.nvmrc) | |
uses: actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
- run: npm ci | |
- run: npm run build --if-present | |
- run: npm run lint | |
- run: npm run type-check | |
- run: npm run test:ci | |
env: | |
CI: true | |
release: | |
name: Release | |
needs: | |
- build | |
runs-on: ubuntu-latest | |
if: "!contains(github.event.head_commit.message, 'skip ci')" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
persist-credentials: false | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "lts/*" | |
- name: Install dependencies | |
run: npm ci | |
- name: Release | |
env: | |
HUSKY: 0 | |
CI: true | |
GITHUB_TOKEN: ${{secrets.GH_TOKEN}} | |
NPM_TOKEN: ${{secrets.NPM_TOKEN}} | |
run: npx semantic-release |