Skip to content

ci: add weekly trivy security scan #264

ci: add weekly trivy security scan

ci: add weekly trivy security scan #264

Workflow file for this run

name: documentation
on:
push:
branches: [ master ]
workflow_dispatch:
jobs:
docs:
name: documentation-website
runs-on: ubuntu-latest
steps:
- name: Set up Go 1.x
uses: actions/setup-go@v5.0.0
with:
go-version: '1.21'
id: go
- run: go version
- uses: actions/setup-node@v4
with:
node-version: 'lts/Hydrogen'
- name: Check out code into the Go module directory
uses: actions/checkout@v4
- name: install algolia-client
run: |
go get -u github.com/algolia/algoliasearch-client-go/v3@v3
go mod vendor
- name: generate block attributes from go source
env:
SEARCH_CLIENT_API_KEY: ${{ secrets.SEARCH_CLIENT_API_KEY }}
run: make generate-docs
- name: build website
working-directory: docs/website
run: |
npm ci && npm run build && npm run generate
- name: create artifact
uses: actions/upload-artifact@v2
with:
name: dist
path: |
docs/website/.output/public
if-no-files-found: warn
retention-days: 2
deploy:
name: 'deploy via github pages'
runs-on: ubuntu-latest
needs:
- docs
steps:
- uses: actions/download-artifact@v2
with:
name: dist
path: 'dist'
- uses: actions/checkout@v4
with:
token: ${{ secrets.GH_COUPER_API_TOKEN }}
path: 'website'
repository: 'coupergateway/couper-docs'
- run: rm -rf website/*/ website/access-control website/command-line # clear sub-folders
- run: cp -RTv dist/ website
- name: setup git && push
working-directory: './website'
run: |
git config user.name "couper-bot"
git config user.email "couperbot@gmail.com"
git add -A && git commit -m "Update website"
git push origin main