Merge pull request #1104 from danskernesdigitalebibliotek/dependabot/… #5508
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: Build | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
name: Build artifacts | |
if: '!github.event.deleted' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
# Required to fetch all commits and tags | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version-file: '.nvmrc' | |
cache: 'yarn' | |
registry-url: 'https://npm.pkg.github.com' | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Install Dependencies | |
run: yarn install --frozen-lockfile | |
- name: Build artifacts | |
run: | | |
yarn build:css:prod | |
VERSION_FILE_NAME=$GITHUB_REPOSITORY \ | |
VERSION_FILE_VERSION=$(git describe --tags --exclude=latest) \ | |
yarn build:js:prod --json webpack-stats.json | |
- name: Upload build | |
uses: actions/upload-artifact@v4 | |
with: | |
name: dist | |
path: dist | |
- name: Upload webpack stats artifact | |
uses: relative-ci/agent-upload-artifact-action@v1 | |
with: | |
webpackStatsFile: ./webpack-stats.json |