-
Notifications
You must be signed in to change notification settings - Fork 12
74 lines (61 loc) · 1.75 KB
/
gh_pages_analytics.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
name: Build and Deploy Analytics Documentation to GitHub Pages
on:
push:
branches:
- 'develop'
workflow_dispatch:
inputs:
force_build:
description: 'Force build and deploy'
required: false
default: false
type: boolean
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
files-changed:
name: Detect what files changed
uses: ./.github/workflows/detect_changed_files_reusable_workflow.yml
with:
base: ${{ github.ref }}
build:
needs: files-changed
if: ${{ inputs.force_build || needs.files-changed.outputs.analytic == 'true' }}
runs-on: ubuntu-22.04
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/[email protected]
- name: Setup CI
uses: ./.github/actions/setup-android
- name: Setup Pages
uses: actions/[email protected]
- name: Build Documentation
run: ./gradlew dokkaAnalytics
env:
GITHUB_USER: ${{ github.actor }}
GITHUB_PERSONAL_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Artifact
uses: actions/[email protected]
with:
name: 'github-pages-analytics'
path: 'shared/build/dokka/analytics'
deploy:
needs: build
runs-on: ubuntu-22.04
timeout-minutes: 10
environment:
name: github_pages_analytics
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/[email protected]
with:
artifact_name: 'github-pages-analytics'