-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (41 loc) · 1.37 KB
/
build.yml
File metadata and controls
43 lines (41 loc) · 1.37 KB
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
# sub workflow that builds the page - behaves differently for production and non-production
name: _Helper Build Page
on:
workflow_call:
inputs:
target_environment:
description: 'The target environment for which this build should run'
default: 'production'
required: false
type: string
target_host:
description: 'The target host for this build'
default: 'docs.signpath.io'
required: false
type: string
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Change Jekyll Config
if: ${{ inputs.target_environment != 'production' }}
run: >
sed -i 's/https:\/\/docs.signpath.io/https:\/\/${{ inputs.target_host }}/' docs/_config.yml &&
sed -i -E 's/target_environment:.*/target_environment: ${{ inputs.target_environment }}/' docs/_config.yml
shell: bash
- name: Create Sitemap
run: python build_sitemap.py https://${{ inputs.target_host }}/
shell: bash
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./docs
destination: ./_site
- name: Upload artifact
uses: actions/upload-pages-artifact@v3