Skip to content

Commit bbfadb1

Browse files
committed
ci: run build only outside of main branch
1 parent c7a615b commit bbfadb1

File tree

2 files changed

+10
-45
lines changed

2 files changed

+10
-45
lines changed

.github/workflows/gh-pages.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Build Jekyll and publish to GitHub Pages
1+
name: Build Jekyll, publish to GitHub Pages, update Algolia
22

33
on:
44
push:

.github/workflows/main.yml

Lines changed: 9 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
name: Main
1+
name: Build Jekyll
22

3-
on: [push]
3+
on:
4+
push:
5+
branches:
6+
- '!main'
47

58
jobs:
6-
build_jekyll:
9+
build:
710
runs-on: ubuntu-latest
811
steps:
912
- name: 📂 checkout
@@ -23,45 +26,7 @@ jobs:
2326
cache-version: 0 # Increment this number if you need to re-download cached gems
2427

2528
- name: 🔨 build Jekyll
26-
run: bundle exec jekyll build
29+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
30+
env:
31+
JEKYLL_ENV: production
2732

28-
build_api_docs:
29-
runs-on: ubuntu-latest
30-
steps:
31-
- name: 📂 checkout
32-
uses: actions/checkout@v3
33-
34-
- uses: actions/setup-node@v3
35-
with:
36-
node-version: 18
37-
38-
- name: ⚙️ install dependencies
39-
run: npm install
40-
41-
- name: 💎 setup ruby
42-
uses: ruby/setup-ruby@v1
43-
with:
44-
bundler-cache: true
45-
cache-version: 0 # Increment this number if you need to re-download cached gems
46-
47-
- name: 🔨 build API docs
48-
run: bundle exec rake api:generate_docs
49-
50-
build_docusaurus:
51-
runs-on: ubuntu-latest
52-
defaults:
53-
run:
54-
working-directory: ./docusaurus
55-
steps:
56-
- name: 📂 checkout
57-
uses: actions/checkout@v3
58-
59-
- uses: actions/setup-node@v3
60-
with:
61-
node-version: 18
62-
63-
- name: ⚙️ install dependencies
64-
run: npm install
65-
66-
- name: 🔨 build Docusaurus
67-
run: npm run build

0 commit comments

Comments
 (0)