Skip to content

Commit

Permalink
feat: create release workflow for mkdocs
Browse files Browse the repository at this point in the history
Signed-off-by: Jacob Larfors <jlarfors@verifa.io>
  • Loading branch information
jlarfors committed Nov 11, 2022
1 parent e03a0b4 commit 794e4a2
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 17 deletions.
28 changes: 11 additions & 17 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ on:
push:
branches:
- main
tags:
- "**"
pull_request:
branches:
- main
Expand Down Expand Up @@ -34,19 +32,15 @@ jobs:
- name: Test
run: go test -v -failfast ./...

# Release
- name: Login to Docker Hub
if: startsWith(github.ref, 'refs/tags/v')
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Release
if: startsWith(github.ref, 'refs/tags/v')
uses: goreleaser/goreleaser-action@v3
mkdocs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}
python-version: "3.x"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Build
run: mkdocs build
53 changes: 53 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: ci
on:
push:
tags:
- "**"
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19
check-latest: true
cache: true

- name: Test
run: go test -v -failfast ./...

# Release
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Release
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}

release-mkdocs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install dependencies
run: pip install -r requirements.txt
- name: Build
run: mkdocs build
- name: Publish
run: mkdocs gh-deploy --force
1 change: 1 addition & 0 deletions docs/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rt-retention.verifa.io

0 comments on commit 794e4a2

Please sign in to comment.