chore(changelog): Update CHANGELOG.md for version 1.4.0 release notes… #1
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: DocLearn CI/CD | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
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 uv | |
# uv sync | |
# - name: Run tests | |
# run: uv run pytest | |
build: | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
- name: Log in to Docker Hub | |
uses: docker/login-action@v2 | |
with: | |
username: ${{ secrets.DOCKER_HUB_USERNAME }} | |
password: ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | |
- name: Build and push Docker image | |
uses: docker/build-push-action@v4 | |
with: | |
context: . | |
platforms: linux/amd64,linux/arm64 | |
push: true | |
tags: | | |
${{ secrets.DOCKER_HUB_USERNAME }}/doclearn-app:latest | |
${{ secrets.DOCKER_HUB_USERNAME }}/doclearn-app:${{ github.ref_name }} | |
# deploy: | |
# needs: build | |
# runs-on: ubuntu-latest | |
# steps: | |
# - name: Deploy to server | |
# uses: appleboy/ssh-action@master | |
# with: | |
# host: ${{ secrets.SERVER_HOST }} | |
# username: ${{ secrets.SERVER_USERNAME }} | |
# key: ${{ secrets.SERVER_SSH_KEY }} | |
# script: | | |
# docker pull ${{ secrets.DOCKER_HUB_USERNAME }}/doclearn-app:latest | |
# docker stop doclearn-app || true | |
# docker rm doclearn-app || true | |
# docker run -d --name doclearn-app -p 8000:80 ${{ secrets.DOCKER_HUB_USERNAME }}/doclearn-app:latest |