update voyager to prevent language switching when adding a new tour #462
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 | |
on: | |
push: | |
concurrency: | |
group: build-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
build-ui: | |
name: UI | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 16 | |
cache: 'npm' | |
- name: install voyager dependencies | |
run: (cd source/voyager && npm ci --legacy-peer-deps) | |
- name: install ui dependencies | |
run: npm ci && (cd source/ui && npm ci) | |
- name: build UI | |
run: npm run build-ui | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: "client" | |
path: "dist" | |
if-no-files-found: error | |
retention-days: 1 | |
build-server: | |
name: Server | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16, 18, 20] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: install | |
run: npm ci && (cd source/server && npm ci) | |
- name: test | |
run: (cd source/server && npm test) | |
- name: build | |
run: npm run build-server | |
- uses: actions/upload-artifact@v4 | |
if: matrix.node-version == 16 | |
with: | |
name: "server-files" | |
path: | | |
source/server/package.json | |
source/server/package-lock.json | |
source/server/migrations/ | |
source/server/templates/ | |
source/server/LICENSE.md | |
retention-days: 1 | |
pack: | |
name: Pack tarball | |
runs-on: ubuntu-latest | |
needs: [build-ui, build-server] | |
steps: | |
- uses: actions/download-artifact@v4 | |
with: | |
path: eCorpus-unpacked | |
- name: edit run scripts | |
working-directory: eCorpus-unpacked | |
run: | | |
jq '.scripts.start ="node server/index.js"' ./server-files/package.json > "package.json" | |
rm server-files/package.json | |
mv server-files/* ./ | |
rm -r server-files | |
- name: make tarball | |
working-directory: eCorpus-unpacked | |
run: | | |
tar -zcf ../eCorpus-${{github.ref_name}}.tgz ./* | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: "dist" | |
path: "eCorpus-*.tgz" | |
if-no-files-found: error | |
retention-days: 10 |