diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..b27119c --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,31 @@ +on: + workflow_dispatch: + push: + branches: main + +name: Quarto Publish + +jobs: + build-deploy: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Copy Quarto file. + run: cp docs/_quarto.yml . + + - name: Copy styles + run: cp docs/styles.css . + + - name: Set up Quarto + uses: quarto-dev/quarto-actions/setup@v2 + + - name: Render and Publish + uses: quarto-dev/quarto-actions/publish@v2 + with: + target: gh-pages + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore index 039024e..aa6dd36 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,8 @@ .Ruserdata .DS_Store .Renviron + +/.quarto/ +/_site/ +_quarto.yml +styles.css diff --git a/.rscignore b/.rscignore index fdd749b..e0f1e08 100644 --- a/.rscignore +++ b/.rscignore @@ -4,4 +4,7 @@ .Renviron .rhino .rscignore +build_local_docs.sh +docs +img tests diff --git a/LICENSE b/LICENSE.md similarity index 100% rename from LICENSE rename to LICENSE.md diff --git a/README.md b/README.md index 2de84ac..5a51fae 100644 --- a/README.md +++ b/README.md @@ -8,10 +8,10 @@ The LogAnalyzer open-source app is a simple, plug and play application developed - The only thing you need to set this up and use is the `CONNECT_API_KEY` set as an environment variable. The idea is that the key should come from either an admin account or someone with privileges to view all apps. Apps that are not available to a user will not have their logs available to them. - If you want to test the app locally, you will need to set the `CONNECT_SERVER` as an environment variable. When deployed, the `CONNECT_SERVER` is setup automatically for you. -![LogAnalyzerDemo](https://github.com/Appsilon/LogAnalyzer/assets/26517718/90d1111d-006b-42db-8d8b-b55ee391cb21) +![](img/app_preview.gif) # Credits -It was our collaboration with Elkem which led to the creation of this app. The initial idea came from use-cases where we realised we wanted to track all the logs and be able to read them properly since Posit Connect was the de facto deployment environment. When we made this app, we realised there was potential in sharing this with the rest of the community and invite everyone to use it and add it. We appreciate and thank Elkem for their openness to share it with the world. +It was our collaboration with Elkem which led to the creation of this app. The initial idea came from use-cases where we realised we wanted to track all the logs and be able to read them properly since Posit Connect was the de facto deployment environment. When we made this app, we realised there was potential in sharing this with the rest of the community and invite everyone to use it and add it. We appreciate and thank Elkem for their openness to share it with the world. You can read more about Appsilon and Elkem's collaboration on our case study [here](https://www.appsilon.com/case-studies/refining-elkems-processes-with-advanced-data-analytics). @@ -27,5 +27,5 @@ Get in touch [opensource@appsilon.com](mailto:opensource@appsilon.com) Explore the [Rhinoverse](https://rhinoverse.dev) - a family of R packages built around [Rhino](https://appsilon.github.io/rhino/)! - Subscribe for Shiny tutorials, exclusive articles, R/Shiny community events, and more. + Subscribe for Shiny tutorials, exclusive articles, R/Shiny community events, and more. diff --git a/build_local_docs.sh b/build_local_docs.sh new file mode 100755 index 0000000..6d44a08 --- /dev/null +++ b/build_local_docs.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# This script is used to build the local documentation for the project. + +remove_files() { + if [ -f _quarto.yml ]; then + echo "Removing _quarto.yml..." + rm _quarto.yml + fi + + if [ -f styles.css ]; then + echo "Removing styles.css..." + rm styles.css + fi +} + +cleanup() { + echo "Cleaning up..." + remove_files + exit 1 +} + +trap cleanup SIGINT + +if [ "$1" = "preview" ]; then + echo "Copying _quarto.yml..." + cp docs/_quarto.yml _quarto.yml + echo "Copying styles.css..." + cp docs/styles.css styles.css + + echo "Building local documentation preview..." + quarto preview +elif [ "$1" = "render" ]; then + echo "Copying _quarto.yml..." + cp docs/_quarto.yml _quarto.yml + echo "Copying styles.css..." + cp docs/styles.css styles.css + + echo "Rendering local documentation..." + quarto render + remove_files +fi diff --git a/docs/.gitignore b/docs/.gitignore new file mode 100644 index 0000000..03173b4 --- /dev/null +++ b/docs/.gitignore @@ -0,0 +1,4 @@ +/.quarto/ +/_site/ +README.md +/img/ diff --git a/docs/_quarto.yml b/docs/_quarto.yml new file mode 100644 index 0000000..0871369 --- /dev/null +++ b/docs/_quarto.yml @@ -0,0 +1,37 @@ +project: + type: website + render: + - README.md + - LICENSE.md + +website: + title: "LogAnalyzer" + page-footer: "By Appsilon with 💙 | Copyright 2024 ©" + repo-url: https://github.com/Appsilon/LogAnalyzer + google-analytics: "G-FQQZL5V93G" + navbar: + background: "#0099F9" + foreground: "#fff" + logo: "https://avatars0.githubusercontent.com/u/6096772" + left: + - text: Home + icon: house + href: README.md + - text: License + icon: key + href: LICENSE.md + right: + - text: GitHub + icon: github + href: https://github.com/Appsilon/LogAnalyzer + - text: Appsilon + href: https://appsilon.com/ + +format: + html: + theme: cosmo + css: styles.css + toc: true + +execute: + freeze: auto diff --git a/docs/styles.css b/docs/styles.css new file mode 100644 index 0000000..ec507fa --- /dev/null +++ b/docs/styles.css @@ -0,0 +1,22 @@ + .navbar-nav > .nav-item > .nav-link.active { + color: #fff !important; + font-weight: bold; +} + +.navbar-nav > .nav-item > a.nav-link:hover { + color: #c2c2c2 !important; +} + +.navbar a.navbar-brand:hover { + color: #c2c2c2 !important; +} + +#footer-banner { + max-width: 796px; +} + +.navbar-logo { + height: auto; + width: 4rem; + max-height: max-content; +} diff --git a/img/app_preview.gif b/img/app_preview.gif new file mode 100644 index 0000000..961ca03 Binary files /dev/null and b/img/app_preview.gif differ diff --git a/img/elkem_logo.png b/img/elkem_logo.png new file mode 100644 index 0000000..fd0e637 Binary files /dev/null and b/img/elkem_logo.png differ