Skip to content

Build

Build #1783

Workflow file for this run

# 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-20.04
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: actions/setup-python@v5
with:
python-version: 3.9
- uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- run: pip3 install -U camkes-deps
- run: sudo apt-get install doxygen
- run: make build JEKYLL_ENV=production
- run: tar -cvf site.tar _site/
- uses: actions/upload-artifact@v4
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-20.04
steps:
- uses: actions/checkout@v4
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@v4
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