Skip to content

(ci) cc coverage without 3rd party action #216

(ci) cc coverage without 3rd party action

(ci) cc coverage without 3rd party action #216

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@v2
with:
go-version: '1.20'
id: go
- run: go version
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Check out code into the Go module directory
uses: actions/checkout@v2
- 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@v3
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