Skip to content
This repository has been archived by the owner on May 19, 2024. It is now read-only.

Commit

Permalink
CD: Build website documentation and deploy to GH pages (#152)
Browse files Browse the repository at this point in the history
* doc: Add creation of website destination directory

If the destination directory does not exists, the script finish with
an error after showing several lines of output.

To avoid the user to ask what has happened, include a paragraph in the
documentation to create the destination directory.

* git: Update .gitignore

Add documentation building directories

* ci: Add dependabot

* ci: Add build and deploy documentation

Execute the 'update.sh' script to generate the documentation.
Deploy the documents to GH pages.
  • Loading branch information
fraya authored May 10, 2024
1 parent 9b6d54b commit 063aa7e
Show file tree
Hide file tree
Showing 4 changed files with 91 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# 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/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
- package-ecosystem: "github-actions" # See documentation for possible values
directory: "/" # Location of package manifests
schedule:
interval: "weekly"
50 changes: 50 additions & 0 deletions .github/workflows/docs-build-linkcheck-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build and deploy docs

on:
push:
# all branches

# This enables the Run Workflow button on the Actions tab.
workflow_dispatch:

# https://github.com/JamesIves/github-pages-deploy-action#readme
permissions:
contents: write

jobs:

build-and-deploy:
runs-on: ubuntu-latest
steps:

- name: Checkout code
uses: actions/checkout@v4

- name: Setup python
uses: actions/setup-python@v5
with:
python-version: '3.10'

- name: Install Python package dependencies
uses: BSFishy/pip-action@v1
with:
packages: |
Sphinx
furo
- name: Build destination directory
run: mkdir opendylan.org

- name: Install Opendylan
uses: dylan-lang/install-opendylan@v3

- name: Execute update script
run: ./update.sh opendylan.org

- name: Bypassing Jekyll on GH Pages
run: sudo touch opendylan.org/.nojekyll

- name: Deploy documents to GH pages
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: opendylan.org
27 changes: 25 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,26 @@
build
# backup files
*~
*.bak
.DS_Store
\#*
*~

# project file
*.hdp

# documentation build directory
build/

# compiler build directory
_build/

# dylan tool package cache
_packages/

# package registry folder
/registry/

# packages downloaded
gendoc-scratch-dir/

# docs for each package
source/package/
5 changes: 5 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ The next step is fetching the repository and its dependencies::
Building the site
=================

First create the destination directory, for instance
:file:`/tmp/opendylan.org`::

mkdir /tmp/opendylan.org

Simply run the :file:`update.sh` script, specifying where you want the HTML
files to be generated::

Expand Down

0 comments on commit 063aa7e

Please sign in to comment.