Skip to content

feat: add Dockerfile and GitHub Actions workflow for production deplo… #1

feat: add Dockerfile and GitHub Actions workflow for production deplo…

feat: add Dockerfile and GitHub Actions workflow for production deplo… #1

Workflow file for this run

name: Prod Deployment
on:
push:
branches:
- main
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to registry.sciol.ac.cn
uses: docker/login-action@v3
with:
registry: registry.sciol.ac.cn
username: ${{ secrets.SCIENCEOL_REGISTRY_USERNAME }}
password: ${{ secrets.SCIENCEOL_REGISTRY_PASSWORD }}
- name: Build and push ui Docker image
run: |
docker build . -t registry.sciol.ac.cn/sciol/ui:latest --push
- name: Download Let's Encrypt CA
run: curl -o ca.crt https://letsencrypt.org/certs/isrgrootx1.pem
- name: Rolling update deployments
run: |
kubectl \
--server=${{ secrets.SCIENCEOL_K8S_SERVER_URL }} \
--token=${{ secrets.SCIENCEOL_K8S_ADMIN_TOKEN }} \
--certificate-authority=ca.crt \
rollout restart deployment sciui -n sciol