-
Notifications
You must be signed in to change notification settings - Fork 2
113 lines (87 loc) · 2.78 KB
/
verify-build.yml
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: PR Build with Jekyll + TinaCMS before approving merge to main
on:
# Runs on pushes targeting the default branch
pull_request:
branches: ["main"]
paths-ignore:
- '.github/**'
- 'Documentation/**'
- 'Archive/**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
jobs:
setup-pages:
runs-on: ubuntu-latest
steps:
- name: Setup Pages
uses: actions/configure-pages@v5
install-node:
runs-on: ubuntu-latest
steps:
- name: install Node
uses: actions/setup-node@v4
with:
node-version: "20"
# checkout:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout Main
# uses: actions/checkout@v4
# with:
# ref: main
# clean: false
# - uses: actions/checkout@v2
# name: Checkout Staging
# with:
# ref: staging
# # Put the checked out files inside the `big-island-buses/heleon` folder
# path: staging/
# clean: false
# # Delete the .git folder from `big-island-buses/heleon`
# # This turns the files into a plain folder instead of a git repository
# - run: rm -rf staging/.git
# Build job
build:
runs-on: ubuntu-latest
needs: [setup-pages, install-node]
# env:
# TBA_AUT_KEY: ${{ secrets.TBA_API_KEY }}
steps:
- name: Checkout PR
uses: actions/checkout@v4
with:
ref: ${{github.ref}}
clean: false
# - uses: actions/checkout@v2
# name: Checkout Staging
# with:
# ref: staging
# # Put the checked out files inside the `big-island-buses/heleon` folder
# path: staging/
# clean: false
# # Delete the .git folder from `big-island-buses/heleon`
# # This turns the files into a plain folder instead of a git repository
# - run: rm -rf staging/.git
# - name: run NPM install ./main/
# run: npm install
- name: run NPM CI
run: npm ci
- name: Build TinaCMS (no indexing)
env:
BUILD_PATH: ${{vars.BUILD_PATH}}
TINA_PUBLIC_CLIENT_ID: ${{ secrets.TINA_PUBLIC_CLIENT_ID }}
TINA_TOKEN: ${{ secrets.TINA_TOKEN }}
#HEAD: ${{ github.ref_name}}
TINA_SEARCH: ${{secrets.TINA_SEARCH}}
run: npx tinacms build --skip-indexing --upstream-branch ${{ github.ref_name}}
- name: Build Main with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./
destination: ./_site