This repository has been archived by the owner on Sep 23, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
80 lines (77 loc) · 2.81 KB
/
docs.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
# Don't edit this file!
# It is automatically updated after every release of https://github.com/47degrees/.github
# If you want to suggest a change, please open a PR or issue in that repository
name: Update documentation
on:
release:
types: [published]
repository_dispatch:
types: [docs]
jobs:
documentation:
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: ubuntu-latest
steps:
- name: Checkout project
uses: actions/checkout@v2
with:
token: ${{ secrets.ADMIN_GITHUB_TOKEN }}
ref: main
- name: Fetch tags
run: git fetch --tags
- name: Setup Scala
uses: olafurpg/setup-scala@v10
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: .ruby-version
- name: Setup github-changelog-generator
run: gem install github_changelog_generator -v 1.15.0
- name: Setup yq
run: sudo snap install yq
- name: Run pre-conditions
run: test -f .github/actions.yml && eval "$(yq e '.pre.docs // "true"' .github/actions.yml)" || true
- name: Generate documentation
run: sbt ci-docs
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
DOWNLOAD_INFO_FROM_GITHUB: true
- name: Run post-conditions
run: test -f .github/actions.yml && eval "$(yq e '.post.docs // "true"' .github/actions.yml)" || true
- name: Generate changelog
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
repo: ${{ github.repository }}
run: |
github_changelog_generator \
--user ${repo%/*} \
--project ${repo#*/} \
--token $GITHUB_TOKEN \
--exclude-labels "duplicate,question,invalid,wontfix,auto-update,auto-changelog,auto-documentation" \
--configure-sections \
'{
"breaking": {
"prefix": "⚠️ **Breaking changes**",
"labels": ["breaking-change"]
},
"enhancement": {
"prefix": "🚀 **Features**",
"labels": ["enhancement"]
},
"documentation": {
"prefix": "📘 **Documentation**",
"labels": ["documentation"]
},
"bug": {
"prefix": "🐛 **Bug Fixes**",
"labels": ["bug"]
},
"dependency": {
"prefix": "📈 **Dependency updates**",
"labels": ["dependency-update", "scala-steward"]
}
}'
- name: Push changes
uses: stefanzweifel/[email protected]
with:
commit_message: 'Update documentation, changelog and other files [skip ci]'