-
Notifications
You must be signed in to change notification settings - Fork 19
71 lines (60 loc) · 1.87 KB
/
cibuild.yml
File metadata and controls
71 lines (60 loc) · 1.87 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
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
name: CI Build
on:
push:
branches-ignore:
- 'dependabot/**'
pull_request:
env:
LC_ALL: en_US.UTF-8
defaults:
run:
shell: bash
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
pages: write
id-token: write
jobs:
GitHub_Pages:
name: GitHub Pages
runs-on: ubuntu-latest
env:
BUNDLE_GEMFILE: Gemfile
BUNDLE_PATH: vendor/bundle
steps:
- name: Harden Runner
uses: step-security/harden-runner@5ef0c079ce82195b2a36a210272d6b661572d83e # v2.14.2
with:
egress-policy: audit # TODO: change to 'egress-policy: block' after couple of runs
- name: Git Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Ruby
uses: ruby/setup-ruby@19a43a6a2428d455dbd1b85344698725179c9d8c # v1.289.0
with:
ruby-version: 3.4.5
bundler-cache: true
# Download and install the Pagefind binary
# see releases: https://github.com/CloudCannon/pagefind/releases
- name: Install Pagefind for Search
run: |
curl -L https://github.com/CloudCannon/pagefind/releases/download/v1.3.0/pagefind-v1.3.0-x86_64-unknown-linux-musl.tar.gz \
-o pagefind.tar.gz
tar xzf pagefind.tar.gz
chmod +x pagefind
- name: Build
run: |
./.github/scripts/docs.sh
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v4
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: GitHub_Pages
if: github.ref == 'refs/heads/master' # <= Restrict deploy to master
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4