-
Notifications
You must be signed in to change notification settings - Fork 0
67 lines (62 loc) · 1.69 KB
/
build.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
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
# Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
#
# SPDX-License-Identifier: BSD-2-Clause
# Build and deploy the site
name: Build
on:
push:
branches:
- master
pull_request:
schedule:
- cron: '7 3 * * *'
workflow_dispatch:
jobs:
build:
name: Site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
- uses: actions/setup-python@v2
with:
python-version: 3.9
- run: pip3 install -U camkes-deps
- run: sudo apt-get install doxygen
- run: sudo gem install bundler
- run: make build JEKYLL_ENV=production
- run: tar -cvf site.tar _site/
- uses: actions/upload-artifact@v2
with:
name: site
path: site.tar
deploy:
if: ${{ github.repository_owner == 'seL4' &&
(github.event_name == 'push' || github.event_name == 'schedule' ||
github.event_name == 'workflow_dispatch') }}
needs: build
name: 'Deploy'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: gh-pages
token: ${{ secrets.GH_TOKEN }}
# for removing files, we need to start fresh; this does not remove dot-files
- run: rm -rf *
- uses: actions/download-artifact@v2
with:
name: site
- run: tar -xvf site.tar
- run: cp -a _site/* .
- run: rm -rf site.tar _site
# recreate CNAME file for GitHub; not included in generated site
- run: echo docs.sel4.systems > CNAME
# add/remove everything
- run: git add -A .
- run: git diff --cached
- run: git config user.name "CI"
- run: git config user.email ci@sel4.systems
- run: git commit -m "auto-deployed"
- run: git push