-
Notifications
You must be signed in to change notification settings - Fork 10
49 lines (41 loc) · 1.56 KB
/
documentation.yaml
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
name: documentation
on:
push:
branches:
- unstable
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Install bazelisk
run: |
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.11.0/bazelisk-linux-amd64"
mkdir -p "${GITHUB_WORKSPACE}/bin/"
mv bazelisk-linux-amd64 "${GITHUB_WORKSPACE}/bin/bazel"
chmod +x "${GITHUB_WORKSPACE}/bin/bazel"
- name: Install Swift dependencies
run: |
sudo apt-get install clang libicu-dev
wget https://download.swift.org/swift-5.6.1-release/ubuntu2004/swift-5.6.1-RELEASE/swift-5.6.1-RELEASE-ubuntu20.04.tar.gz
tar xzf swift-5.6.1-RELEASE-ubuntu20.04.tar.gz
echo "$(pwd)/swift-5.6.1-RELEASE-ubuntu20.04/usr/bin" >> $GITHUB_PATH
- name: Setup clang
run: |
sudo apt -y install clang llvm
./bazel/setup_clang.sh
- name: Clean up documentation branch
run: |
git branch -D documentation || true
git checkout -b documentation
- name: Run docc
run: |
cd "${GITHUB_WORKSPACE}" && ./scripts/docc.sh
- name: Add and commit documentation
run: |
git config --global user.email "docbot@github.com"
git config --global user.name "docbot"
cd "${GITHUB_WORKSPACE}" && git add "docs/*" && git commit -m "Update docs."
- name: Push the new branch
run: |
cd "${GITHUB_WORKSPACE}" && git push --force origin documentation:documentation