2021-07-18 16:31:14 +00:00
|
|
|
name: Build
|
|
|
|
|
|
|
|
on:
|
|
|
|
# Triggers the workflow on push or pull request events but only for the master branch
|
|
|
|
push:
|
|
|
|
branches: [ master ]
|
|
|
|
pull_request:
|
|
|
|
branches: [ master ]
|
|
|
|
|
|
|
|
# Allows you to run this workflow manually from the Actions tab
|
|
|
|
workflow_dispatch:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
2022-02-17 20:00:50 +00:00
|
|
|
- run: echo VITE_APP_VERSION=git-${GITHUB_SHA::6} > .env
|
2021-07-18 16:31:14 +00:00
|
|
|
- run: cat .env
|
|
|
|
- uses: actions/setup-node@v2
|
|
|
|
with:
|
2022-07-08 14:02:48 +00:00
|
|
|
node-version: '18'
|
|
|
|
- run: yarn run build
|
2021-07-18 16:31:14 +00:00
|
|
|
- run: find dist/live-atlas/assets -type f -iname \*.svg -delete
|
|
|
|
- run: cp LICENSE.md dist
|
|
|
|
- name: Upload a Build Artifact
|
|
|
|
uses: actions/upload-artifact@v2.2.4
|
|
|
|
with:
|
|
|
|
name: 'live-atlas'
|
|
|
|
path: 'dist/'
|
|
|
|
if-no-files-found: error
|