-
-
Notifications
You must be signed in to change notification settings - Fork 9
94 lines (83 loc) · 2.26 KB
/
docs.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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
---
name: Publish Catalog 📰
on:
workflow_call:
workflow_dispatch:
push:
tags:
- "v*"
branches:
- main
schedule:
- cron: "17 17 * * 3,6"
jobs:
publish:
name: Build & Deploy TLGC 📖
runs-on: ubuntu-latest
container:
image: ghcr.io/insightsengineering/rstudio_4.3.1_bioc_3.17:latest
permissions:
contents: write
steps:
- name: Checkout repo 🛎
uses: actions/checkout@v3
- name: Cache artifacts 📀
uses: actions/cache@v3
with:
path: |
~/package/.staged.dependencies
book/_freeze
key: ${{ runner.os }}-tlg-catalog
- name: Run Staged dependencies 🎦
uses: insightsengineering/staged-dependencies-action@v1
env:
GITHUB_PAT: ${{ secrets.REPO_GITHUB_TOKEN }}
with:
path: "./package"
enable-check: false
direction: upstream
- name: Render catalog 🖨
run: |
cd book
quarto render
shell: bash
- name: Create artifact 📂
if: startsWith(github.ref, 'refs/tags/v')
run: |
pushd book/_site
zip -r9 $OLDPWD/site.zip *
popd
shell: bash
- name: Upload docs ⬆
if: startsWith(github.ref, 'refs/tags/v')
uses: actions/upload-artifact@v3
with:
name: site.zip
path: site.zip
- name: Publish docs
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./book/_site
upload-release-assets:
name: Upload assets 🔼
needs: publish
runs-on: ubuntu-latest
if: >
startsWith(github.ref, 'refs/tags/v')
&& !contains(github.event.commits[0].message, '[skip docs]')
steps:
- name: Checkout repo 🛎
uses: actions/checkout@v3
- name: Download artifact ⏬
uses: actions/download-artifact@v3
with:
name: site.zip
- name: Upload binaries to release ⤴
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: site.zip
asset_name: catalog.zip
tag: ${{ github.ref }}
overwrite: true