build: sync env #12
Workflow file for this run
This file contains 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: Sync endpoint | |
on: | |
push: | |
branches: | |
- sync | |
jobs: | |
sync-to-hub: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: '3.10' | |
cache: 'pip' | |
- name: Download endpoint | |
uses: actions/download-artifact@v3 | |
with: | |
name: endpoint | |
path: sync/endpoint.txt | |
- name: run | |
if: success() || failure() | |
env: | |
HF_TOKEN: ${{ secrets.HF_TOKEN }} | |
ENDPOINTS: ${{ vars.ENDPOINTS }} | |
run: cd sync && pip install huggingface_hub && python sync.py && cat endpoint.txt | |
- name: Upload endpoint | |
uses: actions/upload-artifact@v3 | |
with: | |
name: endpoint | |
path: sync/endpoint.txt |