-
Notifications
You must be signed in to change notification settings - Fork 6
49 lines (49 loc) · 1.43 KB
/
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
name: Build and Deploy to Netlify
# This workflow runs periodically builds (daily) to deploy the
# CometBFT documentation website to Netlify
on:
push:
branches:
- main
workflow_dispatch:
schedule:
- cron: "0 0 * * *"
jobs:
build:
name: Build and deploy to Netlify
runs-on: ubuntu-latest
container:
image: jekyll/builder:stable
env:
JEKYLL_UID: 1001
JEKYLL_GID: 1001
steps:
# Checkout cometbft-docs repo
- name: Checkout site
uses: actions/checkout@v3
# Clone the cometbft repo
- name: Fetch cometbft repo
run: make fetch
# Generate _data folder content
- name: Build versions data
run: make versions-data
# Install Jekyll dependencies
- name: Install dependencies
run: |
bundle install
# Build the Jekyll website
- name: Build website
run: |
chmod a+wx .
bundle exec jekyll build --disable-disk-cache -V
# Deploy the _site folder to Netlify CometBFT documentation website
- name: Deploy to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './_site'
deploy-message: "Deploy from cometbft-docs GitHub Actions"
production-deploy: true
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 5