From 8247ce16650b31fe9d133f680f965c6e75f3fec2 Mon Sep 17 00:00:00 2001 From: developomp Date: Fri, 28 Jan 2022 11:31:27 +0900 Subject: [PATCH] gh workflow fix and improvement - run only when the `script.py` is changed - fixed branch switching --- .github/workflows/deploy.yml | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4780058..6c64cb7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -4,6 +4,8 @@ on: push: branches: - master + paths: + - setup.py jobs: build_and_deploy: @@ -11,7 +13,7 @@ jobs: name: Deploy runs-on: ubuntu-latest steps: - - name: Checkout Repo + - name: Checkout master uses: actions/checkout@v2 - name: Archive Artifact @@ -20,9 +22,10 @@ jobs: name: setup path: setup.py - - name: Switch branch - run: | - git checkout gh-pages + - name: Checkout gh-pages + uses: actions/checkout@v2 + with: + ref: gh-pages - name: Download Artifact uses: actions/download-artifact@v2