Skip to content

will it build?

will it build? #111

Workflow file for this run

name: πŸš€ Deploy
on:
push:
branches:
- main
- dev
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
actions: write
contents: read
jobs:
lint:
name: ⬣ ESLint
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: βŽ” Setup node
uses: actions/setup-node@v4
with:
cache: npm
cache-dependency-path: ./package.json
node-version: 18
- name: πŸ“₯ Install deps
run: npm install
- name: πŸ”¬ Lint
run: npm run lint
typecheck:
name: Κ¦ TypeScript
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: βŽ” Setup node
uses: actions/setup-node@v4
with:
cache: npm
cache-dependency-path: ./package.json
node-version: 18
- name: πŸ“₯ Install deps
run: npm install
- name: πŸ”Ž Type check
run: npm run typecheck --if-present
vitest:
name: ⚑ Vitest
runs-on: ubuntu-latest
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: βŽ” Setup node
uses: actions/setup-node@v4
with:
cache: npm
cache-dependency-path: ./package.json
node-version: 18
- name: πŸ“₯ Install deps
run: npm install
- name: ⚑ Run vitest
run: npm run test -- --coverage
deploy:
name: πŸš€ Deploy
runs-on: ubuntu-latest
needs: [lint, typecheck, vitest]
# only deploy main/dev branch on pushes
if: ${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/dev') && github.event_name == 'push' }}
steps:
- name: ⬇️ Checkout repo
uses: actions/checkout@v4
- name: Push to dokku
uses: dokku/github-action@master
with:
git_remote_url: "ssh://dokku@dokku.me:22/appname"
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}