Repository navigation
fix: disable caching for config.js to ensure API keys update #2
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 Push Docker Image | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up QEMU | |
| uses: docker/setup-qemu-action@v3 | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| - name: Login to Docker Hub | |
| uses: docker/login-action@v3 | |
| with: | |
| username: ${{ secrets.DOCKER_USERNAME }} | |
| password: ${{ secrets.DOCKER_PASSWORD }} | |
| - name: Create config.js for Production | |
| run: | | |
| echo "window.env = {" > public/config.js | |
| echo " VITE_OPENAI_API_KEY: \"${{ secrets.VITE_OPENAI_API_KEY }}\"," >> public/config.js | |
| echo " VITE_GOOGLE_API_KEY: \"${{ secrets.VITE_GOOGLE_API_KEY }}\"," >> public/config.js | |
| echo " VITE_ANTHROPIC_API_KEY: \"${{ secrets.VITE_ANTHROPIC_API_KEY }}\"," >> public/config.js | |
| echo " VITE_JINA_API_KEY: \"${{ secrets.VITE_JINA_API_KEY }}\"" >> public/config.js | |
| echo "};" >> public/config.js | |
| - name: Build and push | |
| uses: docker/build-push-action@v5 | |
| with: | |
| context: . | |
| push: true | |
| tags: adamgaborjaniszabo/debate-trainer:latest | |
| platforms: linux/amd64,linux/arm64 | |