buster / .github /workflows /pull_request.yaml
jerpint's picture
Push to dev space on any PR commit (#18)
2030999 unverified
raw
history blame contribute delete
No virus
839 Bytes
name: dev-actions
on:
pull_request:
branches:
- '*'
jobs:
black:
runs-on: ubuntu-latest
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: black linter
uses: psf/black@stable
with:
options: "--check --diff"
deploy-dev-hf-space:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: 0
lfs: true
- name: Push to hub
env:
HF_TOKEN: ${{ secrets.HF_TOKEN }}
HF_USERNAME: ${{ secrets.HF_USERNAME }}
BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
run: git push --force https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/towardsai-buster/buster-dev $BRANCH_NAME:main