-
Notifications
You must be signed in to change notification settings - Fork 110
48 lines (40 loc) · 1.17 KB
/
docs-release.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
name: Release Docs
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-rc[0-9]+"
permissions:
contents: write
jobs:
build-docs:
runs-on: ubuntu-latest
if: github.repository_owner == 'leanprover-community'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Lean
uses: leanprover/lean-action@v1
with:
test: false
lint: false
use-github-cache: true
- name: Build Docs
working-directory: docs
run: lake build --keep-toolchain -q Batteries:docs
- name: Compress Docs
working-directory: docs
env:
TAG_NAME: ${{ github.ref_name }}
run: |
tar -czf docs-${TAG_NAME}.tar.gz doc doc-data
zip -rq docs-${TAG_NAME}.zip doc doc-data
- name: Release Docs
uses: softprops/action-gh-release@v2
with:
prerelease: ${{ contains(github.ref, 'rc') }}
make_latest: ${{ !contains(github.ref, 'rc') }}
files: |
docs/docs-${{ github.ref_name }}.tar.gz
docs/docs-${{ github.ref_name }}.zip
fail_on_unmatched_files: true