CI Pipeline #3
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-workflow | |
run-name: CI Pipeline | |
on: [push, workflow_dispatch] | |
jobs: | |
ci-pipeline: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checking out code | |
uses: actions/checkout@v4 | |
- name: setup node 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
- name: install deps | |
run: npm ci | |
- name: apply prettier | |
run: npm run prettier | |
- name: Perfom type check | |
run: npm run typecheck | |
- name: Do unit tests | |
run: npm run test | |
- name: Build the application | |
run: npm run build | |
- name: upload build artefact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: '/dist' | |
cd-pipline: | |
needs: ci-pipeline | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: github-pages | |
steps: | |
- name: deploy the artefact | |
uses: actions/deploy-pages@v4 |