docs: update npm badge #111
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: '🚀 CD (Website) — Publish' | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- 'website/**' | |
workflow_dispatch: | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
timeout-minutes: 15 | |
name: Deploy | |
steps: | |
- name: Actions - Checkout | |
uses: actions/checkout@v4 | |
- name: Actions - Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22.x' | |
- name: Cache Dependencies | |
uses: actions/cache@v4 | |
with: | |
path: ~/.npm | |
key: npm-website-${{ hashFiles('website/package-lock.json') }} | |
restore-keys: npm-website- | |
- name: Installing Dependencies | |
run: cd website && npm ci | |
- name: Checking Types | |
run: cd website && npm run typecheck | |
- name: Run Unit Tests | |
run: cd website && npm run test:unit | |
- name: Building Site | |
run: cd website && npm run build | |
- name: Checking Docker Build | |
run: cd website && docker compose up -d --build | |
env: | |
APP_PORT: ${{secrets.APP_PORT}} | |
- name: Checking for Service Status Header | |
run: | | |
sleep 1 | |
curl --fail --silent --output /dev/null http://localhost:${{ env.APP_PORT }} | |
env: | |
APP_PORT: ${{secrets.APP_PORT}} | |
- name: Deploy | |
run: cd website && npm run deploy | |
env: | |
SRV_HOST: ${{secrets.SRV_HOST}} | |
SRV_USER: ${{secrets.SRV_USER}} | |
SRV_PORT: ${{secrets.SRV_PORT}} | |
SRV_PASS: ${{secrets.SRV_PASS}} | |
APP_PORT: ${{secrets.APP_PORT}} |