-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Action for checking the build
- Loading branch information
Showing
3 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
20.9 |
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