fix(#211): add event handler on back to search result #128
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
# https://github.com/kartevonmorgen/kartevonmorgen.ts/issues/84 | |
name: kartevonmorken-dev | |
on: | |
push: | |
branches: [ develop ] | |
jobs: | |
deploy: | |
runs-on: self-hosted | |
steps: | |
- name: Clone project | |
uses: actions/checkout@v2 | |
- name: Setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: lts/* | |
cache: 'yarn' | |
- name: Install yarn | |
run: npm install -g yarn | |
- name: Get yarn cache directory path | |
id: yarn-cache-dir-path | |
run: echo "::set-output name=dir::$(yarn cache dir)" | |
- name: Cache yarn | |
uses: actions/cache@v3 | |
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) | |
with: | |
path: ${{ steps.yarn-cache-dir-path.outputs.dir }} | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-yarn- | |
- name: Install front-end dependancies | |
run: yarn install | |
- name: Install process manager | |
run: yarn add pm2 | |
- name: Cache NextJS | |
uses: actions/cache@v3 | |
with: | |
# See here for caching with `yarn` https://github.com/actions/cache/blob/main/examples.md#node---yarn or you can leverage caching with actions/setup-node https://github.com/actions/setup-node | |
path: ${{ github.workspace }}/.next/cache | |
# Generate a new cache whenever packages or source files change. | |
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | |
# If source files changed but packages didn't, rebuild from a prior cache. | |
restore-keys: | | |
${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}- | |
- name: Build front-end | |
run: yarn build:dev | |
- name: Setup python | |
uses: actions/setup-python@v2 | |
- name: Install tag-synchronizer dependancies | |
working-directory: ./scripts/python | |
run: pip3 install -r requirements.txt | |
# https://github.com/kartevonmorgen/kartevonmorgen.ts/issues/84 | |
- name: Delete previous processes | |
run: pm2 delete pm2.config.js | |
- name: Start front-end | |
run: pm2 start pm2.config.js --only kartevonmorgen-dev | |
- name: Run tag synchronizer | |
run: pm2 start pm2.config.js --only kartevonmorgen-tag-synchronizer-dev |