From 4dc0fb87611713ddd9920c02232bd579841007b1 Mon Sep 17 00:00:00 2001 From: tooomm Date: Wed, 21 Jul 2021 13:44:03 +0200 Subject: [PATCH 1/2] CI: upload artifacts for easy reviewing (#276) --- .github/workflows/deploy.yml | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 8b9387d9..42fe9141 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -13,12 +13,12 @@ on: paths-ignore: - '**.md' schedule: - # every 6 hours = 4 times a day - - cron: '0 */6 * * *' + # Every 8 hours = 3 times a day + - cron: '0 */8 * * *' jobs: deploy: - # do not run the sheduled run on forks + # Do not run the scheduled workflow on forks if: github.event != 'schedule' || github.repository_owner == 'Cockatrice' runs-on: ubuntu-latest @@ -32,6 +32,7 @@ jobs: uses: actions/checkout@v2 - name: Checkout output branch + # Run only when triggered from master if: env.DEPLOY == 'true' uses: actions/checkout@v2 with: @@ -52,7 +53,17 @@ jobs: shell: bash run: python3 -m magic_spoiler + - name: Upload artifacts + # Run only when triggered from a PR + if: ${{github.event}} == 'pull_request' + uses: actions/upload-artifact@v2 + with: + name: spoiler-output + path: ${{github.workspace}}/${{env.OUTPUT_PATH}} + if-no-files-found: error + - name: Deploy changes + # Run only when triggered from master and changes are available if: env.DEPLOY == 'true' && steps.run.outputs.deploy == 'true' shell: bash working-directory: ${{env.OUTPUT_PATH}} From 8a048f07702ac04f506d8da48e39edf89a6daa36 Mon Sep 17 00:00:00 2001 From: tooomm Date: Wed, 21 Jul 2021 14:23:21 +0200 Subject: [PATCH 2/2] CI: fix syntax (#278) --- .github/workflows/deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 42fe9141..f6720fe5 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -55,7 +55,7 @@ jobs: - name: Upload artifacts # Run only when triggered from a PR - if: ${{github.event}} == 'pull_request' + if: github.event_name == 'pull_request' uses: actions/upload-artifact@v2 with: name: spoiler-output