diff --git a/.github/workflows/cife.yml b/.github/workflows/cife.yml new file mode 100644 index 0000000..b6f87cd --- /dev/null +++ b/.github/workflows/cife.yml @@ -0,0 +1,44 @@ +name: Build and push DocsGPT-FE Docker image + +on: + workflow_dispatch: + push: + branches: + - main + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up QEMU + uses: docker/setup-qemu-action@v1 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v1 + + - name: Login to DockerHub + uses: docker/login-action@v2 + with: + username: ${{ secrets.DOCKER_USERNAME }} + password: ${{ secrets.DOCKER_PASSWORD }} + + - name: Login to ghcr.io + uses: docker/login-action@v2 + with: + registry: ghcr.io + username: ${{ github.repository_owner }} + password: ${{ secrets.GHCR_TOKEN }} + + # Runs a single command using the runners shell + - name: Build and push Docker images to docker.io and ghcr.io + uses: docker/build-push-action@v2 + with: + file: './frontned/Dockerfile' + platforms: linux/amd64 + context: ./frontend + push: true + tags: | + ${{ secrets.DOCKER_USERNAME }}/docsgpt-fe:latest + ghcr.io/${{ github.repository_owner }}/docsgpt-fe:latest diff --git a/README.md b/README.md index cec21d5..a36d1e4 100644 --- a/README.md +++ b/README.md @@ -55,6 +55,16 @@ Copy .env_sample and create .env with your openai api token 4. Run the app `python app.py` +To start frontend +1. Navigate to `/frontend` folder +2. Install dependencies +`npm install` +3. Run the app +4. `npm run dev` + +Alternatively, you can use docker-compose to run the app via docker +1. From the root folder run `docker-compose build && docker-compose up` + [How to install the Chrome extension](https://github.com/arc53/docsgpt/wiki#launch-chrome-extension)