Add CI/CD #10
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/CD Pipeline | |
on: | |
push: | |
branches: | |
- main | |
- dev | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Out Code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Run Checks | |
shell: bash | |
run: npm run check | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check Out Code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Run Tests | |
shell: bash | |
run: npm run test | |
deploy: | |
runs-on: ubuntu-latest | |
needs: | |
- check | |
- test | |
steps: | |
- name: Check Out Code | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 2 | |
- name: Setup | |
uses: ./.github/actions/setup | |
- name: Build | |
shell: bash | |
run: npm run build | |
- name: Deploy | |
shell: bash | |
run: echo deploying to cloudflare |