jerpint commited on
Commit
2030999
1 Parent(s): 2b4f517

Push to dev space on any PR commit (#18)

Browse files

* add push to dev space on PR

* change action names

Files changed (1) hide show
  1. .github/workflows/pull_request.yaml +17 -3
.github/workflows/pull_request.yaml CHANGED
@@ -1,4 +1,4 @@
1
- name: lint
2
 
3
  on:
4
  pull_request:
@@ -6,7 +6,7 @@ on:
6
  - '*'
7
 
8
  jobs:
9
- tests:
10
  runs-on: ubuntu-latest
11
  steps:
12
  - name: Check out repository code
@@ -14,4 +14,18 @@ jobs:
14
  - name: black linter
15
  uses: psf/black@stable
16
  with:
17
- options: "--check --diff"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: dev-actions
2
 
3
  on:
4
  pull_request:
 
6
  - '*'
7
 
8
  jobs:
9
+ black:
10
  runs-on: ubuntu-latest
11
  steps:
12
  - name: Check out repository code
 
14
  - name: black linter
15
  uses: psf/black@stable
16
  with:
17
+ options: "--check --diff"
18
+ deploy-dev-hf-space:
19
+ runs-on: ubuntu-latest
20
+ steps:
21
+ - uses: actions/checkout@v3
22
+ with:
23
+ ref: ${{ github.event.pull_request.head.ref }}
24
+ fetch-depth: 0
25
+ lfs: true
26
+ - name: Push to hub
27
+ env:
28
+ HF_TOKEN: ${{ secrets.HF_TOKEN }}
29
+ HF_USERNAME: ${{ secrets.HF_USERNAME }}
30
+ BRANCH_NAME: ${{ github.event.pull_request.head.ref }}
31
+ run: git push --force https://$HF_USERNAME:$HF_TOKEN@huggingface.co/spaces/towardsai-buster/buster-dev $BRANCH_NAME:main