diff --git a/.github/workflows/sync.yml b/.github/workflows/sync.yml index 5c03db36..10c99add 100644 --- a/.github/workflows/sync.yml +++ b/.github/workflows/sync.yml @@ -26,7 +26,7 @@ jobs: env: HF_TOKEN: ${{ secrets.HF_TOKEN }} ENDPOINTS: ${{ vars.ENDPOINTS }} - run: cd sync && cat endpoint.txt && pip install huggingface_hub && python sync.py && cat endpoint.txt + run: cd sync && pip install huggingface_hub && python sync.py && cat endpoint.txt - name: Save cache id: file-save uses: actions/cache/save@v3 diff --git a/sync/sync.py b/sync/sync.py index c11ad81b..4d77b44a 100644 --- a/sync/sync.py +++ b/sync/sync.py @@ -12,6 +12,7 @@ try: with open(file,"r") as f: content=f.read().strip() + print('content:', content) endpoint = endpoints[1] if content == endpoints[0] else endpoints[0] f.close() except IOError: @@ -22,4 +23,3 @@ print('new endpoint', endpoint) hf_api.add_space_secret('hf4all/bingo2', 'ENDPOINT', endpoint.strip()) -