Skip to content

Update README

Update README #18

Workflow file for this run

name: Bridge Server Deployment
on:
push:
branches:
- main
paths:
- 'server/**' # Only trigger the workflow for changes in the server directory
jobs:
build_and_publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
run: pnpm install
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
run: |
docker login --username "${{ secrets.GH_USER }}" --password "${{ secrets.GH_TOKEN }}" ghcr.io
- name: Run Docker build and push with pnpm script
run: |
pnpm docker:build && pnpm docker:push
working-directory: server
deploy:
needs: build_and_publish
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Set up kubectl
uses: azure/setup-kubectl@v3
with:
version: v1.30.6
- name: Deploy to Kubernetes
env:
KUBE_CONFIG: ${{ secrets.KUBE_CONFIG }}
run: |
pnpm k8s:apply
working-directory: server