45 lines
1.2 KiB
YAML
45 lines
1.2 KiB
YAML
name: Build
|
|
run-name: Build and Test
|
|
on: push
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Clone Repo
|
|
uses: actions/checkout@v3
|
|
- name: Init Environment
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '18'
|
|
- name: Install Dependencies
|
|
run: npm ci
|
|
- name: Lint
|
|
run: npm run lint
|
|
- name: Build
|
|
run: npm run build
|
|
- name: Test
|
|
run: npm test
|
|
deploy:
|
|
runs-on: ubuntu-latest
|
|
needs: build
|
|
steps:
|
|
- name: Clone Repo
|
|
uses: actions/checkout@v3
|
|
- name: Init Environment
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '18'
|
|
- name: Install Dependencies
|
|
run: npm ci
|
|
- name: Build
|
|
run: npm run build
|
|
- name: Deploy
|
|
run: |
|
|
echo Deploying...
|
|
sleep 1
|
|
echo ...
|
|
sleep 1
|
|
echo ...
|
|
sleep 1
|
|
echo DONE! |