Skip to content

Commit

Permalink
Try including screenshots in documentation compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
davecraig committed Aug 17, 2024
1 parent 29e7c10 commit 1f694fd
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/jekyll-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,31 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Set Up JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu' # See 'Supported distributions' for available options
java-version: '17'

- name: Generate screenshots
run : ./gradlew updateDebugScreenshotTest

- name: Copy screenshots into docs directory
run : cp -r ./app/src/debug/screenshotTest/reference/org/scottishtecharmy/soundscape/* ./docs

- name: Setup Pages
uses: actions/configure-pages@v5

- name: Build with Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./docs
destination: ./_site

- name: Upload artifact
uses: actions/upload-pages-artifact@v3

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,55 +40,67 @@ annotation class DevicePreviews
@DevicePreviews
annotation class CustomPreviews

class PreviewTest {
class AudioBeaconsPreviewTestClass {
@CustomPreviews
@Composable
fun AudioBeaconsPreviewTest() {
SoundscapeTheme {
IntroductionAudioBeaconPreview()
}
}
}

class FinishPreviewTestClass {
@CustomPreviews
@Composable
fun FinishPreviewTest() {
SoundscapeTheme {
Finish()
}
}
}

class HearingPreviewTestClass {
@CustomPreviews
@Composable
fun HearingPreviewTest() {
SoundscapeTheme {
HearingPreview()
}
}
}

class LanguagePreviewTestClass {
@CustomPreviews
@Composable
fun LanguagePreviewTest() {
SoundscapeTheme {
LanguagePreview()
}
}
}

class ListeningPreviewTestClass {
@CustomPreviews
@Composable
fun ListeningPreviewTest() {
SoundscapeTheme {
ListeningPreview()
}
}
}

class WelcomePreviewTestClass {
@CustomPreviews
@Composable
fun WelcomePreviewTest() {
SoundscapeTheme {
PreviewWelcome()
}
}
}

class HomePreviewTestClass {
@CustomPreviews
@Composable
fun HomePreviewTest() {
Expand Down
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ See the document [here](actions.md) to learn about the GitHub actions used and h
* [Audio API](audio-API.md)
* [Framework choices](framework.md)
* [Pathway to product](pathway-to-product.md)
* [Screenshots](screenshots.md)
3 changes: 3 additions & 0 deletions docs/screenshots.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# AudioBeacons page
![Images](AudioBeaconsPreviewTestClass/AudioBeaconsPreviewTest_Dansk_2231f351_da39a3ee_0.png)

0 comments on commit 1f694fd

Please sign in to comment.