Skip to content

Commit

Permalink
Merge branch 'master' into ak/patchGeneratorOrder
Browse files Browse the repository at this point in the history
  • Loading branch information
aditya-07 committed Mar 7, 2024
2 parents 575875d + ac5fd62 commit 10e9410
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 1 deletion.
39 changes: 39 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,3 +94,42 @@ jobs:
with:
name: build
path: build.zip

# Steps that follow are related to the Documentation Web Site
# This deploys content based on docs/ which ends up in site/
# to https://google.github.io/android-fhir/ using GitHub Pages.

- name: Build Docs Site
# This 1st step intentionally runs not just on the main ("master") branch
# but also for all pull requests. This serves to detect doc breakages.
# (But the following steps, which do the actual deploy, only run for
# the main branch, of course.)
run: ./build-docs.bash

- name: Setup GitHub Pages
if: ${{ github.event_name == 'push' }}
uses: actions/configure-pages@v4

- name: Upload site/ directory as GitHub Pages artifact
if: ${{ github.event_name == 'push' }}
uses: actions/upload-pages-artifact@v3
with:
path: "site/"

deploy-website:
needs: build
if: ${{ github.event_name == 'push' }}
runs-on: ubuntu-latest
# https://docs.github.com/en/actions/security-guides/automatic-token-authentication
# Sets required permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages.
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
# https://github.com/actions/deploy-pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
11 changes: 10 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
bin/
gen/
out/

# Uncomment the following line in case you need and you don't have the release build type files in your app
# release/

Expand All @@ -40,13 +41,14 @@ captures/
*.iml
.idea

# VSCode/Eclipse
# VSCode/Eclipse
.classpath
.project
.settings

# Keystore files
# Uncomment the following lines if you do not want to check your keystore files in.
# (Please carefully consider the security implications of doing so! ASK, if unclear.)
#*.jks
#*.keystore

Expand All @@ -55,6 +57,8 @@ captures/
.cxx/

# Google Services (e.g. APIs or Firebase)
# (Because this file contains secret credentials, like passwords;
# please carefully consider the security implications of doing so! ASK, if unclear.)
# google-services.json

# Freeline
Expand All @@ -81,3 +85,8 @@ lint/tmp/

# Mac OS
.DS_Store

# MkDocs Documentation Generation
# Note: The docs/ directory is our SOURCE (in MD),
# and the site/ directory is our TARGET (in HTML)
site/
24 changes: 24 additions & 0 deletions build-docs.bash
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/usr/bin/env bash
# SPDX-License-Identifier: Apache-2.0
#
# Copyright 2023-2024 The Enola <https://enola.dev> Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -euox pipefail

mkdir -p site/

# TODO Replace this with mkdocs generation
# TODO Fix https://github.com/google/android-fhir/issues/2237 and generate API JavaDoc
cp -R docs/* site/

0 comments on commit 10e9410

Please sign in to comment.