forked from google/docsy
-
Notifications
You must be signed in to change notification settings - Fork 0
44 lines (42 loc) · 1.23 KB
/
smoke.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: smoke
on:
push:
branches: [ main ]
pull_request:
schedule: # midnight every day
- cron: '0 0 * * *'
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
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
with:
node-version-file: .nvmrc
cache: npm
cache-dependency-path: package.json
- run: tools/install-hugo.sh
shell: bash
- name: Make site (non-PR)
if: github.event_name != 'pull_request'
run: |
mkdir tmp && cd tmp && set -x
../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