Skip to content
This repository was archived by the owner on Nov 10, 2025. It is now read-only.

Update README.md

Update README.md #40

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
permissions:
contents: read
packages: write
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run tests (placeholder)
run: |
echo "No tests configured. Passing by default."
build_and_push:
needs: test
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Set lowercase owner
id: lc_owner
run: echo "owner_lc=$(echo '${{ github.repository_owner }}' | tr '[:upper:]' '[:lower:]')" >> $GITHUB_OUTPUT
- name: Log in to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push server image with cache
uses: docker/build-push-action@v4
with:
context: .
file: ./Infrastructure/Dockerfile.server
push: true
tags: ghcr.io/${{ steps.lc_owner.outputs.owner_lc }}/nexapod-server:latest
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Build and push client image with cache
uses: docker/build-push-action@v4
with:
context: .
file: ./Infrastructure/Dockerfile.client
push: true
tags: ghcr.io/${{ steps.lc_owner.outputs.owner_lc }}/nexapod-client:latest
cache-from: type=gha
cache-to: type=gha,mode=max
# deploy:
# needs: build_and_push
# runs-on: ubuntu-latest
# steps:
# - name: Deploy to DigitalOcean
# uses: appleboy/ssh-action@master
# with:
# host: ${{ secrets.DO_HOST }}
# username: ${{ secrets.DO_USERNAME }}
# key: ${{ secrets.DO_SSH_KEY }}
# script: |
# OWNER_LC=$(echo "${{ github.repository_owner }}" | tr '[:upper:]' '[:lower:]')
# echo ${{ secrets.DEPLOY_TOKEN }} | docker login ghcr.io -u ${{ github.actor }} --password-stdin
# docker stop nexapod-server || true
# docker rm nexapod-server || true
# docker pull ghcr.io/$OWNER_LC/nexapod-server:latest
# docker run -d \
# --name nexapod-server \
# --restart always \
# -p 8000:8000 \
# ghcr.io/$OWNER_LC/nexapod-server:latest