Merge branch 'master' into tooomm-patch-5

This commit is contained in:
tooomm
2021-07-21 14:33:23 +02:00

View File

@@ -13,12 +13,12 @@ on:
paths-ignore: paths-ignore:
- '**.md' - '**.md'
schedule: schedule:
# every 6 hours = 4 times a day # Every 8 hours = 3 times a day
- cron: '0 */6 * * *' - cron: '0 */8 * * *'
jobs: jobs:
deploy: 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' if: github.event != 'schedule' || github.repository_owner == 'Cockatrice'
runs-on: ubuntu-latest runs-on: ubuntu-latest
@@ -32,6 +32,7 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
- name: Checkout output branch - name: Checkout output branch
# Run only when triggered from master
if: env.DEPLOY == 'true' if: env.DEPLOY == 'true'
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
@@ -52,7 +53,17 @@ jobs:
shell: bash shell: bash
run: python3 -m magic_spoiler run: python3 -m magic_spoiler
- name: Upload artifacts
# Run only when triggered from a PR
if: github.event_name == '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 - name: Deploy changes
# Run only when triggered from master and changes are available
if: env.DEPLOY == 'true' && steps.run.outputs.deploy == 'true' if: env.DEPLOY == 'true' && steps.run.outputs.deploy == 'true'
shell: bash shell: bash
working-directory: ${{env.OUTPUT_PATH}} working-directory: ${{env.OUTPUT_PATH}}