Skip to content

Commit

Permalink
chore(ci): automatically build handbook (#293)
Browse files Browse the repository at this point in the history
* Initial commit for the Logos Handboook

* A bit more adds to the book

* chore(ci): setup automated CI for book

* chore(ci): update branches

* fix(ci): remove extra needs

---------

Co-authored-by: Maciej Hirsz <hello@maciej.codes>
  • Loading branch information
jeertmans and maciejhirsz committed Jun 25, 2023
1 parent b0cbf29 commit 1bd812f
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
16 changes: 16 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates

version: 2
updates:
- package-ecosystem: github-actions
# Workflow files stored in the
# default location of `.github/workflows`
directory: /
schedule:
interval: daily
labels:
- github-actions
- dependencies
56 changes: 56 additions & 0 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# Workflow for building and deploying a mdBook site to GitHub Pages
name: GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches: [book]

# Also runs on PR
pull_request:

# 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

jobs:
# Build job
build-book:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
with:
mdbook-version: '0.4.28'
# mdbook-version: 'latest'
- name: Build book
run: mdbook build book
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./book

# Deployment job
deploy:
if: github.event_name != 'pull_request'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: [build-book]
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2

0 comments on commit 1bd812f

Please sign in to comment.