forked from aquasecurity/avd-generator
-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (100 loc) · 3.67 KB
/
cron.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
name: Build Website
on:
schedule:
- cron: "30 1 * * *"
workflow_dispatch:
jobs:
build:
name: Build Website
# runs-on: ubuntu-20.04
runs-on: macos-latest
steps:
- name: Set up Go 1.20
uses: actions/setup-go@v4
with:
go-version: '1.20'
id: go
- name: Setup Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: "0.81.0"
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Create build folder
run: mkdir avd-repo
- name: Checkout public vuln-list-repo
uses: actions/checkout@v3
with:
repository: aquasecurity/vuln-list
token: ${{ secrets.ORG_REPO_TOKEN }}
path: avd-repo/vuln-list
- name: Checkout public vuln-list-nvd-repo
uses: actions/checkout@v3
with:
repository: aquasecurity/vuln-list-nvd
token: ${{ secrets.ORG_REPO_TOKEN }}
path: avd-repo/vuln-list-nvd
- name: Checkout public kube-hunter-repo
uses: actions/checkout@v3
with:
repository: aquasecurity/kube-hunter
token: ${{ secrets.ORG_REPO_TOKEN }}
path: avd-repo/kube-hunter-repo
- name: Checkout public cloud-security-remediation-guides-repo
uses: actions/checkout@v3
with:
repository: aquasecurity/cloud-security-remediation-guides
token: ${{ secrets.ORG_REPO_TOKEN }}
path: avd-repo/remediations-repo
- name: Checkout public tracee-repo
uses: actions/checkout@v3
with:
repository: aquasecurity/tracee
token: ${{ secrets.ORG_REPO_TOKEN }}
path: avd-repo/tracee-repo
- name: Checkout public cloudsploit-repo
uses: actions/checkout@v3
with:
repository: aquasecurity/cloudsploit
token: ${{ secrets.ORG_REPO_TOKEN }}
path: avd-repo/cloudsploit-repo
- name: Checkout public trivy-policies-repo
uses: actions/checkout@v3
with:
repository: aquasecurity/trivy-policies
token: ${{ secrets.ORG_REPO_TOKEN }}
path: avd-repo/trivy-policies-repo
- name: Checkout public kube-bench-repo
uses: actions/checkout@v3
with:
repository: aquasecurity/kube-bench
token: ${{ secrets.ORG_REPO_TOKEN }}
path: avd-repo/kube-bench-repo
- name: Checkout private chain-bench-repo
uses: actions/checkout@v3
with:
repository: aquasecurity/chain-bench
token: ${{ secrets.ORG_REPO_TOKEN }}
path: avd-repo/chain-bench-repo
- name: Build generator
run: make md-clean md-build
- name: Sync avd-repo with latest changes from generator
run: make sync-all
- name: Build and Generate Markdown pages
run: make md-generate
- name: Generate Hugo website
run: make hugo-generate
- name: Copy assets
run: make copy-assets
- name: Deploy Search Index to MeiliSearch Instance
run: |
cd avd-repo
curl -H 'Content-Type: application/json' -H 'X-Meili-API-Key: ${{ secrets.SEARCHAPITOKEN }}' -X POST ${{ secrets.SEARCHAPIHOST }}/indexes/avd/documents --data @docs/searchindex.json
- name: Install AWS CLI
run: pip3 install awscli
- name: Sync changes to the bucket
run: aws s3 sync --no-progress --only-show-errors --size-only avd-repo/docs ${{ secrets.PROD_AVD_BUCKET }}
env:
AWS_ACCESS_KEY_ID: ${{ secrets.PROD_AVD_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.PROD_AVD_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1