Skip to content

Commit

Permalink
Add more run optns and don't run Windows for PRs
Browse files Browse the repository at this point in the history
  • Loading branch information
chalin committed Jan 12, 2024
1 parent c1958e8 commit 164e25f
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions .github/workflows/smoke.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: smoke

on:
push:
branches: [ main ]
pull_request:
schedule: # midnight every day
- cron: '0 0 * * *'
workflow_dispatch:

jobs:
Expand All @@ -10,6 +14,11 @@ jobs:
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
env:
BASE_REPO: ${{ github.repository }}
BRANCH: ${{ github.head_ref }}
PR_REPO: ${{ github.event.pull_request.head.repo.full_name }}
SHA: ${{ github.sha }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -20,10 +29,15 @@ jobs:
- run: tools/install-hugo.sh
shell: bash
- name: Make site
env:
REPO: ${{ github.event.pull_request.head.repo.full_name }}
BRANCH: ${{ github.head_ref }}
if: github.event_name != 'pull_request'
run: |
mkdir tmp && cd tmp && set -x
../tools/make-site.sh -p $REPO -v $BRANCH
../tools/make-site.sh -p $BASE_REPO -v $SHA
shell: bash
- name: Make site from PR
# Don't run Windows test for PRs, it's too slow
if: github.event_name == 'pull_request' && matrix.os != 'windows-latest'
run: |
mkdir tmp && cd tmp && set -x
../tools/make-site.sh -p $PR_REPO -v $BRANCH
shell: bash

0 comments on commit 164e25f

Please sign in to comment.