diff --git a/.github/workflows/ui.yml b/.github/workflows/ui.yml index 507fa28..0180cb2 100644 --- a/.github/workflows/ui.yml +++ b/.github/workflows/ui.yml @@ -44,6 +44,11 @@ jobs: - name: Unit tests run: npm test -- --watch=false --browsers=ChromeHeadless + - name: Inject API credentials + run: | + sed -i "s/__API_USERNAME__/${{ secrets.API_USERNAME }}/g" src/environments/environment.prod.ts + sed -i "s/__API_PASSWORD__/${{ secrets.API_PASSWORD }}/g" src/environments/environment.prod.ts + - name: Production build run: npm run build -- --configuration production @@ -52,6 +57,7 @@ jobs: name: Docker build & push runs-on: ubuntu-latest needs: ci + if: github.ref == 'refs/heads/main' outputs: sha_tag: ${{ steps.tag.outputs.sha }} @@ -98,6 +104,7 @@ jobs: name: Deploy runs-on: ubuntu-latest needs: docker + if: github.ref == 'refs/heads/main' steps: - name: SSH deploy