CoolFace
Apppublic

AtharvaThakur/Insights

sourceHugging Faceupdated 2y agoView on Hugging Face
0likes
Deployment.yml54 linesDownload Raw Back to workflows
1name: Deployment2 3on:4  push:5    branches:6      - 'main'7 8permissions:9  contents: read10 11jobs:12  build:13 14    runs-on: ubuntu-latest15 16    steps:17    - uses: actions/checkout@v318    - name: Set up Python 3.1019      uses: actions/setup-python@v320      with:21        python-version: "3.10"22    - name: Install dependencies23      run: |24        python -m pip install --upgrade pip25        pip install flake8 pytest26        if [ -f requirements.txt ]; then pip install -r requirements.txt; fi27    - name: Set up environment variables28      run: |29        echo "GOOGLE_API_KEY=${{ secrets.GOOGLE_API_KEY }}" >> $GITHUB_ENV30        touch data.csv31    - name: Lint with flake832      run: |33        # stop the build if there are Python syntax errors or undefined names34        flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics35        # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide36        flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics37    - name: Test with pytest38      run: |39        cd Testing40        pytest -vv41  42  sync-to-hub:43    runs-on: ubuntu-latest44    needs: "build"45    steps:46      - uses: actions/checkout@v347        with:48          fetch-depth: 049          lfs: true50      - name: Push to hub51        env:52          HF_TOKEN: ${{ secrets.HF_TOKEN }}53        run: git push --force https://AtharvaThakur:$HF_TOKEN@huggingface.co/spaces/AtharvaThakur/Insights main54