Skip to content

Commit 26f9794

Browse files
committed
chore(ci): build docs on branch 📝-* as well but don't deploy
1 parent aaf63ae commit 26f9794

File tree

1 file changed

+20
-2
lines changed

1 file changed

+20
-2
lines changed

.github/workflows/doc.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Docs
22
on:
33
push:
4-
branches: [🦆]
4+
branches: [🦆, 📝-*]
55

66
jobs:
77
check:
@@ -37,9 +37,27 @@ jobs:
3737
run: |
3838
cp doc/logo-small.svg output
3939
40-
- name: Deploy
40+
# If we are on the main branch, deploy it to the website
41+
- name: Deploy to GitHub Pages
4142
uses: JamesIves/github-pages-deploy-action@4.1.0
43+
if: github.ref == 'refs/heads/🦆'
4244
with:
4345
branch: gh-pages
4446
folder: output
4547
single-commit: true
48+
49+
50+
# Otherwise, put it on the Actions page to allow download
51+
- name: Archive the generated documentation
52+
if: github.ref != 'refs/heads/🦆'
53+
# use tar + compressor for faster upload and smaller artifact size
54+
run: |
55+
cd output
56+
tar -cv doc | xz > r3-api-docs.tar.xz
57+
58+
- name: Upload the generated documentation as an artifact
59+
uses: actions/upload-artifact@v2
60+
if: github.ref != 'refs/heads/🦆'
61+
with:
62+
name: r3-api-docs
63+
path: output/r3-api-docs.tar.xz

0 commit comments

Comments
 (0)