-
Notifications
You must be signed in to change notification settings - Fork 5
68 lines (56 loc) · 1.61 KB
/
Copy pathdeploy.yml
File metadata and controls
68 lines (56 loc) · 1.61 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
name: Build and deploy site
on:
push:
branches:
- main
# Triggered after leaseos-www publishes a new build.
repository_dispatch:
types:
- leaseos-updated
workflow_dispatch:
# Prevent two runs in this repository from publishing simultaneously.
concurrency:
group: orderlab-pages
cancel-in-progress: false
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0 # for jekyll-last-modified-at to access git history
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
- name: Install dependencies
run: |
gem install bundler
bundle config set --local path 'vendor/bundle'
bundle install
- name: Build site with Jekyll
run: bundle exec jekyll build
- name: Checkout prebuilt LeaseOS website
uses: actions/checkout@v4
with:
repository: orderlab/leaseos-www
ref: gh-pages
path: leaseos-built
- name: Add LeaseOS to the main site
run: |
rm -rf _site/LeaseOS
mkdir -p _site/LeaseOS
# Exclude Git metadata from the published site.
rsync -a \
--exclude='.git' \
--exclude='.github' \
leaseos-built/ _site/LeaseOS/
- name: Deploy to GitHub pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_site
publish_branch: gh-pages