rererefixing search #47
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 & Deploy | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-deploy-online: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1.4.4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Build online version | |
run: | | |
npm ci | |
npm run rebuild-db-online | |
npm run webpack | |
npm run bundle | |
npm run quick-build | |
env: | |
CI: true | |
REMOTE_MEDIA_PATH: ${{ secrets.REMOTE_MEDIA_PATH }} | |
- name: Deploy online version to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} | |
BRANCH: gh-pages # The branch the action should deploy to. | |
FOLDER: bundle # The folder the action should deploy. | |
build-and-save-offline: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1.4.4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Build offline-compatible local version | |
run: | | |
npm ci | |
npm run rebuild-db-offline | |
npm run webpack | |
npm run bundle | |
mkdir bundle-offline | |
mv bundle bundle-offline/LingView | |
env: | |
CI: true | |
REMOTE_MEDIA_PATH: ${{ secrets.REMOTE_MEDIA_PATH }} | |
- name: Save offline-compatible local version as an artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: LingView-local | |
path: bundle-offline | |
- name: Message | |
run: echo "Saved offline-compatible local version of LingView as an artifact! When distributing, be sure to include the media files in the data/media_files/, keeping the original filenames." |