Merge pull request #16 from komotok/patch-1 #73
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: CI | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
code-check: | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v2.4.0 | |
with: | |
node-version: "16.11.0" | |
- name: Install dependencies | |
run: "yarn" | |
- name: Lint | |
run: "yarn lint:root" | |
- name: Test compile | |
run: "yarn build:test" | |
deploy: | |
needs: code-check | |
runs-on: ubuntu-20.04 | |
if: github.event_name != 'pull_request' | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Deploying to Dokku server | |
uses: dokku/github-action@v1.0.1 | |
with: | |
branch: main | |
git_remote_url: ${{ secrets.GIT_REMOTE_URL }} | |
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }} |