Merge pull request #297 from ozgurg/dev #338
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] | |
paths-ignore: | |
- "**.md" | |
- ".github/dependabot.yml" | |
jobs: | |
ci: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [ubuntu-latest] | |
node: [18] | |
steps: | |
- name: "[SET UP] Checkout π" | |
uses: actions/checkout@v4.1.1 | |
- name: "[SET UP] Setup node env π" | |
uses: actions/setup-node@v4.0.2 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: "[SET UP] Cache node_modules π¦" | |
uses: actions/cache@v4.0.1 | |
with: | |
path: ~/.npm | |
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: "[SET UP] Install dependencies π¨π»βπ»" | |
run: npm ci | |
- name: "[QUALITY] Run linter π" | |
run: npm run lint | |
- name: "[QUALITY] Run unit tests π§ͺ" | |
run: npm run test | |
- name: "[DEPLOY] Build for production" | |
run: npm run generate | |
- name: "[DEPLOY] Deploy to Firebase" | |
uses: w9jds/firebase-action@v13.4.0 | |
with: | |
args: deploy --only hosting | |
env: | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} |