Skip to content

Commit

Permalink
Add CI quarto setup.
Browse files Browse the repository at this point in the history
Move images so they are included in the page.
Add script for docs preview.
Website styleing.
Include LICENSE.
  • Loading branch information
jakubnowicki committed May 14, 2024
1 parent 4480137 commit d734984
Show file tree
Hide file tree
Showing 11 changed files with 147 additions and 3 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -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 }}
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@
.Ruserdata
.DS_Store
.Renviron

/.quarto/
/_site/
_quarto.yml
styles.css
3 changes: 3 additions & 0 deletions .rscignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,7 @@
.Renviron
.rhino
.rscignore
build_local_docs.sh
docs
img
tests
File renamed without changes.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 <img src="https://github.com/Appsilon/LogAnalyzer/assets/26517718/b26fd60b-4989-4d31-a01e-5cf865f5ec9b" alt="Elkem" width="50"/> 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 <img src="img/elkem_logo.png" alt="Elkem" width="50"/> 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).

Expand All @@ -27,5 +27,5 @@ Get in touch [[email protected]](mailto:[email protected])
Explore the [Rhinoverse](https://rhinoverse.dev) - a family of R packages built around [Rhino](https://appsilon.github.io/rhino/)!

<a href = "https://appsilon.us16.list-manage.com/subscribe?u=c042d7c0dbf57c5c6f8b54598&id=870d5bfc05" target="_blank">
<img src="https://raw.githubusercontent.com/Appsilon/website-cdn/gh-pages/shiny_weekly_light.jpg" alt="Subscribe for Shiny tutorials, exclusive articles, R/Shiny community events, and more."/>
<img id="footer-banner" src="https://raw.githubusercontent.com/Appsilon/website-cdn/gh-pages/shiny_weekly_light.jpg" alt="Subscribe for Shiny tutorials, exclusive articles, R/Shiny community events, and more."/>
</a>
42 changes: 42 additions & 0 deletions build_local_docs.sh
Original file line number Diff line number Diff line change
@@ -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
4 changes: 4 additions & 0 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
/.quarto/
/_site/
README.md
/img/
37 changes: 37 additions & 0 deletions docs/_quarto.yml
Original file line number Diff line number Diff line change
@@ -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
22 changes: 22 additions & 0 deletions docs/styles.css
Original file line number Diff line number Diff line change
@@ -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;
}
Binary file added img/app_preview.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/elkem_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit d734984

Please sign in to comment.