fix: Update content for Bell Labs structure consistency #28
This file contains hidden or 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: Build and Deploy SIL Website | |
| on: | |
| push: | |
| branches: [main, master] | |
| tags: ['v*'] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| test: | |
| name: Run Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install uv | |
| run: | | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | |
| - name: Create virtual environment | |
| run: uv venv | |
| - name: Install dependencies | |
| run: | | |
| source .venv/bin/activate | |
| uv pip install -e ".[dev]" | |
| - name: Run ruff | |
| run: | | |
| source .venv/bin/activate | |
| ruff check . | |
| - name: Run mypy | |
| run: | | |
| source .venv/bin/activate | |
| mypy src/ | |
| - name: Run pytest | |
| run: | | |
| source .venv/bin/activate | |
| pytest --cov=src tests/ | |
| build: | |
| name: Build Container | |
| runs-on: ubuntu-latest | |
| needs: test | |
| if: github.event_name == 'push' | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Podman | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y podman | |
| - name: Build container image | |
| run: | | |
| podman build -t sil-website:${{ github.sha }} . | |
| podman tag sil-website:${{ github.sha }} sil-website:latest | |
| - name: Test container health | |
| run: | | |
| # Run container | |
| podman run -d --name sil-website-test -p 8000:8000 sil-website:latest | |
| # Wait for health check | |
| sleep 10 | |
| # Check health endpoint | |
| curl -f http://localhost:8000/health || exit 1 | |
| # Stop container | |
| podman stop sil-website-test | |
| # Note: Actual deployment uses registry.mytia.net via deploy-container.sh | |
| # GitHub Container Registry push removed - not part of deployment workflow | |
| deploy: | |
| name: Deploy to Production | |
| runs-on: ubuntu-latest | |
| needs: build | |
| if: github.ref == 'refs/heads/main' | |
| # Uncomment when ready for automated deployment | |
| # environment: production | |
| steps: | |
| - name: Deploy notice | |
| run: | | |
| echo "🚀 Ready to deploy to production" | |
| echo "Uncomment SSH deployment steps when server is configured" | |
| # Uncomment when production server is ready | |
| # - name: Deploy to production | |
| # uses: appleboy/ssh-action@master | |
| # with: | |
| # host: ${{ secrets.DEPLOY_HOST }} | |
| # username: ${{ secrets.DEPLOY_USER }} | |
| # key: ${{ secrets.DEPLOY_KEY }} | |
| # script: | | |
| # cd /home/scottsen/src/projects/sil-website | |
| # git pull | |
| # podman pull ghcr.io/${{ github.repository_owner }}/sil-website:latest | |
| # sudo systemctl restart sil-website | |
| # sleep 5 | |
| # curl -f https://semanticinfrastructurelab.org/health || exit 1 |