name: Deploy Dev run-name: Deploy to dev space on: push: branches: - '**' - '!main' concurrency: # NOTE: The same actor will deploy to the same space, so we should cancel other earlier jobs. group: ${{ github.workflow }}-${{ github.actor }} cancel-in-progress: true jobs: run_deploy_tool: runs-on: ubuntu-latest permissions: contents: read steps: - name: Check out repository code uses: actions/checkout@v4 with: fetch-depth: '0' - name: Update Repo README.md run: | python3 .github/tools/generate_readme.py --mode="dev" --deployer="${{ github.actor }}" > README.md git config --global user.email "github-actions[bot]@users.noreply.github.com" git config --global user.name "GitHub Actions[bot]" git add ./README.md if [[ `git status --porcelain` ]]; then git commit -m "[skip ci] update README.md" fi - name: Run deploy tool run: | python3 .github/tools/deploy_to_space.py \ --mode="dev" \ --deployer="${{ github.actor }}" \ --branch_name="${{ github.ref_name }}" \ --username="${{ vars.HF_USERNAME }}" \ --user_token="${{ secrets.HF_TOKEN }}"