Skip to content

Commit

Permalink
cleanups
Browse files Browse the repository at this point in the history
- Use mdbook for documentation
- Modify pages deploy action to use mdbook
- Initialize git-lfs and track *.png to start
- Move systemd service and profile.d script to res folder and update justfile to match

Signed-off-by: Ryan Brue <[email protected]>
  • Loading branch information
ryanabx committed Sep 25, 2024
1 parent 5c20e72 commit 0d51e7e
Show file tree
Hide file tree
Showing 15 changed files with 35 additions and 212 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.png filter=lfs diff=lfs merge=lfs -text
83 changes: 21 additions & 62 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -1,70 +1,29 @@
# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

# Sample workflow for building and deploying a Jekyll site to GitHub Pages
name: Deploy Jekyll site to Pages
name: github pages

on:
push:
branches: ["master"]
paths:
- "docs/**"

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
branches:
- master
pull_request:

jobs:
# Build job
build:
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
deploy:
runs-on: ubuntu-20.04
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3' # Not needed with a .ruby-version file
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
cache-version: 0 # Increment this number if you need to re-download cached gems
working-directory: '${{ github.workspace }}/docs'
- name: Setup Pages
id: pages
uses: actions/configure-pages@v3
- name: Build with Jekyll
# Outputs to the './_site' directory by default
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
env:
JEKYLL_ENV: production
- name: Upload artifact
# Automatically uploads an artifact from the './_site' directory by default
uses: actions/upload-pages-artifact@v1
- uses: actions/checkout@v2

- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
with:
path: "docs/_site/"
mdbook-version: 'latest'

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
- run: mdbook build docs

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs/book
16 changes: 1 addition & 15 deletions docs/.gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1 @@
# Not sure what a .gitignore is?
# See: https://git-scm.com/docs/gitignore

# These are directly copied from Jekyll's first-party docs on `.gitignore` files:
# https://jekyllrb.com/tutorials/using-jekyll-with-bundler/#commit-to-source-control

# Ignore the default location of the built site, and caches and metadata generated by Jekyll
_site/
.sass-cache/
.jekyll-cache/
.jekyll-metadata

# Ignore folders generated by Bundler
.bundle/
vendor/
book
7 changes: 0 additions & 7 deletions docs/Gemfile

This file was deleted.

92 changes: 0 additions & 92 deletions docs/Gemfile.lock

This file was deleted.

21 changes: 0 additions & 21 deletions docs/LICENSE

This file was deleted.

8 changes: 0 additions & 8 deletions docs/_config.yml

This file was deleted.

6 changes: 6 additions & 0 deletions docs/book.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[book]
authors = ["Ryan Brue <[email protected]>"]
language = "en"
multilingual = false
src = "src"
title = "Desktop Entry Daemon - Register desktop entries at runtime through DBus"
4 changes: 4 additions & 0 deletions docs/src/SUMMARY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Summary

- [Introduction](./introduction.md)
- [Usage](./usage.md)
5 changes: 0 additions & 5 deletions docs/index.md → docs/src/introduction.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
---
title: Home
layout: home
---

# Desktop Entry Daemon

Desktop Entry Daemon is a userspace DBus API and daemon to manage desktop entries. This could be expanded later to include a system-level component, but the current scope is just for userspace applications.
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ lib-dir := '/lib'
daemon-src := 'target' / 'release' / name
daemon-dst := base-dir / 'bin' / name

data-src := 'profile.d' / 'desktop-entry-daemon.sh'
data-src := 'res' / 'desktop-entry-daemon.profile.d'
data-dst := conf-dir / 'profile.d' / 'desktop-entry-daemon.sh'

service-src := 'systemd' / 'desktop-entry-daemon.service'
service-src := 'res' / 'desktop-entry-daemon.service'
service-dst := lib-dir / 'systemd' / 'user' / 'desktop-entry-daemon.service'

build *args:
Expand Down
File renamed without changes.
File renamed without changes.
Binary file modified res/desktopentry.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 0d51e7e

Please sign in to comment.