-
Notifications
You must be signed in to change notification settings - Fork 1
34 lines (31 loc) · 1.2 KB
/
tagged-docs.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
name: Retain docs by tag
on:
push:
tags:
- "docs/*"
jobs:
deploy-website:
name: Deploy website to Github Pages to sub-folder
# TODO: add environment (name,url). tag filter can be changed to "-/*" so that we can use ${{ github.ref_name }}
# directly here as well. The base folder doesn't even have to be "-" and can be "archive", or some meaningful thing.
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- id: setTargetFolder
run: |
tag_without_prefix=$(echo ${{ github.ref_name }} | cut -b 6-);
echo "tag_without_prefix: $tag_without_prefix"
echo "targetFolder=-/$tag_without_prefix" >> $GITHUB_OUTPUT
- name: Install and Build 🔧
run: |
yarn
export WEBSITE_BASE_URL="/jui/${{steps.setTargetFolder.outputs.targetFolder}}/"
echo "WEBSITE_BASE_URL: $WEBSITE_BASE_URL"
yarn workspace website run build
- name: Deploy 🚀
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: packages/website/build
target-folder: ${{steps.setTargetFolder.outputs.targetFolder}}