Merge remote-tracking branch 'origin/main' into develop #754
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |