-
Notifications
You must be signed in to change notification settings - Fork 8
73 lines (60 loc) · 1.95 KB
/
publish-catalog.yaml
File metadata and controls
73 lines (60 loc) · 1.95 KB
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
name: Publish catalog
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the main branch
on:
push:
branches: [ main ]
repository_dispatch:
types: [ released ]
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
publish:
# if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
env:
DIST_DIR: ./build
PUBLISH_BRANCH: gh-pages
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install yq
run: |
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys CC86BB64
sudo add-apt-repository ppa:rmescandon/yq
sudo apt update
sudo apt install yq -y
- name: Install jq
run: |
curl -Lo jq https://github.com/stedolan/jq/releases/download/jq-1.6/jq-linux64
chmod +x jq
sudo mv jq /usr/local/bin
- name: Setup NodeJS
uses: actions/setup-node@v2-beta
with:
node-version: '16'
registry-url: https://registry.npmjs.org/
- name: Build Catalog UI
run: |
npm ci
CI=false npm run build
- name: Build Catalog YAML
run: |
./.github/scripts/build-catalog.sh ${{ env.DIST_DIR }}
- name: Set up markdown
run: |
cp -R md ${{ env.DIST_DIR }}
- name: Set up schemas
run: |
cp -R schemas ${{ env.DIST_DIR }}
- name: Set up interfaces
run: |
cp -R interfaces ${{ env.DIST_DIR }}
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ env.DIST_DIR }}
publish_branch: ${{ env.PUBLISH_BRANCH }}
enable_jekyll: false
cname: modules.cloudnativetoolkit.dev