start adding v2 #26
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: Node.js CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: self-hosted | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{matrix.node-version}} | |
cache: "yarn" | |
- name: Setup Environment Variables | |
run: echo '${{ secrets.ENV_FILE }}' > ./app/.env | |
- name: Install & Build | |
run: | | |
yarn install | |
yarn build | |
- name: Stop & Start | |
run: | | |
pm2 stop "lyra-bot" | |
pm2 start "lyra-bot" --time | |
pm2 save |