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 67444e9
Showing 1 changed file with 20 additions and 5 deletions.
25 changes: 20 additions & 5 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,13 @@ 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 }}
# TODO: drop PR testing under Windows because it's too slow?
# if: github.event_name != 'pull_request' && matrix.os != 'windows-latest'
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -19,11 +30,15 @@ jobs:
cache-dependency-path: package.json
- run: tools/install-hugo.sh
shell: bash
- name: Make site
env:
REPO: ${{ github.event.pull_request.head.repo.full_name }}
BRANCH: ${{ github.head_ref }}
- name: Make site (non-PR)
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
if: github.event_name == 'pull_request'
run: |
mkdir tmp && cd tmp && set -x
../tools/make-site.sh -p $PR_REPO -v $BRANCH
shell: bash

0 comments on commit 67444e9

Please sign in to comment.