GitHub Actions, ビルド結果を別ブランチにpushする
GitHub Actions実行中に生成したbuild
ディレクトリの内容を別ブランチにpushする。
name: Buildon:push:branches:- masterjobs:deploy:name: Buildruns-on: ubuntu-lateststeps:- uses: actions/checkout@v2- name: Setup Pythonuses: actions/setup-python@v2with:# Version range or exact version of a Python version to use, using SemVer's version range syntax.python-version: 3.x- name: Install dependenciesrun: pip3 install -r requirements.txt- name: Buildrun: python3 app/main.py# run: |# python3 app/cmd1.py# python3 app/cmd2.py# https://github.com/s0/git-publish-subdir-action- name: Push to build branchuses: s0/git-publish-subdir-action@masterenv:REPO: selfBRANCH: buildFOLDER: buildGITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}