Ray Chen commited on
Commit
6c42963
·
1 Parent(s): 2c54808

new: add new workflow to deploy on dev branches

Browse files
.github/workflows/deploy-to-dev.yaml ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ name: Deploy Dev
2
+ run-name: Deploy to dev space
3
+
4
+ on:
5
+ push:
6
+ branches:
7
+ - '**'
8
+ - '!main'
9
+
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref_name }}
12
+ cancel-in-progress: true
13
+
14
+ jobs:
15
+ run_deploy_tool:
16
+ runs-on: ubuntu-latest
17
+ permissions:
18
+ contents: read
19
+ steps:
20
+ - name: Check out repository code
21
+ uses: actions/checkout@v4
22
+ with:
23
+ fetch-depth: '0'
24
+ - name: Update Repo README.md
25
+ run: |
26
+ python3 .github/tools/generate_readme.py --mode="dev" --deployer="${{ github.actor }}" > README.md
27
+ git config --global user.email "github-actions[bot]@users.noreply.github.com"
28
+ git config --global user.name "GitHub Actions[bot]"
29
+ git add ./README.md
30
+ if [[ `git status --porcelain` ]]; then
31
+ git commit -m "[skip ci] update README.md"
32
+ fi
33
+ - name: Run deploy tool
34
+ run: |
35
+ python3 .github/tools/deploy_to_space.py \
36
+ --mode="dev" \
37
+ --deployer="${{ github.actor }}" \
38
+ --branch_name="${{ github.ref_name }}" \
39
+ --username="${{ vars.HF_USERNAME }}" \
40
+ --user_token="${{ secrets.HF_TOKEN }}"