-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (35 loc) · 1.14 KB
/
build_github_pages.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
# Workflow checking if the documentation builds with Jekyll as expected
# Only used for checking if a pull request can be safely merged
name: Build GitHub Pages with Jekyll
on:
# Runs on pull requests targeting the default branch
pull_request:
types: [opened, edited, reopened, synchronize]
branches: ["main"]
# May also be started manually
workflow_dispatch:
# Runs automatically every first day of the month
schedule:
- cron: '0 12 1 * *'
jobs:
# Builds the GitHub pages and uploads the html files
build-github-pages:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Build With Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./docs
destination: ./docs/_site
# Upload only if started manually
- name: Upload Artifact
if: contains(fromJSON('["workflow_dispatch"]'), github.event_name)
uses: actions/upload-pages-artifact@v3
with:
name: docs_folder
path: ./docs/_site
if-no-files-found: error