diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..abd6940f0 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,47 @@ +name: Build + +on: [push] + +jobs: + build: + # This job doesn't run the tests because they are a bit unstable. + runs-on: ubuntu-latest + + defaults: + run: + working-directory: korp-frontend + + strategy: + matrix: + # Having "" here enables the `node-version-file` option + node-version: ["", 14, 16, 18, 20] + + steps: + - name: Checkout main repo + uses: actions/checkout@v4 + with: + path: korp-frontend + + - name: Checkout Språkbanken config repo + uses: actions/checkout@v4 + with: + repository: spraakbanken/korp-frontend-sb + token: ${{ secrets.ACCESS_TOKEN }} + ref: ${{ github.ref == 'master' && 'master' || 'dev' }} # Choose dev or master matching the main repo. + path: korp-frontend-sb + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + node-version-file: korp-frontend/.nvmrc + + - name: Install dependencies + run: yarn install + + - name: Link config + run: | + echo '{"configDir": "../korp-frontend-sb/app"}' > run_config.json + + - name: Build + run: yarn build diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 000000000..48ef2c10b --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +20.9 diff --git a/CHANGELOG.md b/CHANGELOG.md index 80cd06b54..63af3bc91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## [9.5.0-dev] +### Added + +- A GitHub action to check the build + ### Changed - Logo changes: New Korp, new Språkbanken Text, replaced Swe-CLARIN with University of Gothenburg, new Karp icon