Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 52 additions & 16 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,26 @@ on:
push:
branches:
- main # Set a branch to deploy

schedule:
- cron: "0 3 * * *"

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

defaults:
run:
shell: bash

env:
# ----------------------------------------------------------------------------
# Specify the deployment environment: staging or production
hugoEnvironment: production
HUGO_ENVIRONMENT: staging
HUGO_VERSION: 0.133.1

jobs:
# ----------------------------------------------------------------------------
Expand All @@ -42,6 +55,7 @@ jobs:
outputs:
zoteroVersion: ${{ fromJson(steps.zoteroVersion.outputs.headers).last-modified-version }}
cacheHit: ${{ steps.cache-zotero-bib.outputs.cache-hit }}

runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand All @@ -66,15 +80,18 @@ jobs:
${{ fromJson(steps.zoteroVersion.outputs.headers).last-modified-version }}

# ----------------------------------------------------------------------------
# Deploy the website. This job is conditional, we will always run it on a
# Build the website. This job is conditional, we will always run it on a
# push or if on a scheduled run the cache was determined to be out of date.
#
deploy:
build:
needs: check
runs-on: ubuntu-latest
if: github.event_name == 'push' || needs.check.outputs.cacheHit != 'true'
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 0

- name: Cache Zotero Bibliography
id: cache-zotero-bib
Expand Down Expand Up @@ -102,13 +119,17 @@ jobs:
./update_bibliography.sh
sudo cp --recursive ${GITHUB_WORKSPACE}/static/data ~/data
fi
shell: bash

- name: Setup Hugo
uses: peaceiris/actions-hugo@v3
with:
hugo-version: '0.127.0'
extended: true
# Install Hugo Extended
#
- name: Install Hugo CLI
run: |
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb

- name: Setup Pages
id: pages
uses: actions/configure-pages@v5

- name: Setup Node
uses: actions/setup-node@v4
Expand All @@ -120,11 +141,26 @@ jobs:
- run: npm install --verbose

- name: Build
run: hugo -e $hugoEnvironment

- name: Deploy
uses: peaceiris/actions-gh-pages@v4
if: github.ref == 'refs/heads/main'
env:
# HUGO_ENVIRONMENT: staging
HUGO_CACHEDIR: ${{ runner.temp }}/hugo_cache
TZ: America/New York
run: hugo -d "./public" --cleanDestinationDir -e staging

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
path: ./public

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@v4

1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
_site
.sass-cache
.jekyll-metadata
public/
node_modules/
_gen/
.hugo_build.lock
Expand Down
2 changes: 1 addition & 1 deletion config/_default/hugo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ canonifyURLs: false
# Default to false and set to true for production in config/production/hugo.yaml
enableRobotsTXT: false

# aasetDir: Location where Hugo looks for assets
# assetDir: Location where Hugo looks for assets
assetDir: static

# Enable .GitInfo object for each page. This will give values to .Lastmod etc.
Expand Down
2 changes: 1 addition & 1 deletion config/_default/markup.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ goldmark:
# See: https://gohugo.io/getting-started/configuration-markup/#highlight
# for additional information on configuration options.
# https://www.docsy.dev/docs/adding-content/lookandfeel/#code-highlighting-with-chroma
# contains Docsy specfiic code highlighting information
# contains Docsy specfic code highlighting information
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

specfic -> specific

highlight:
# See a complete list of available styles at https://xyproto.github.io/splash/docs/all.html
#style: solarized-dark
Expand Down
2 changes: 1 addition & 1 deletion config/_default/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ github_branch: main
github_subdir:
github_project_repo: https://github.com/interlisp/medley

# Google custom seach engine configuration
# Google custom search engine configuration
# gcs_engine_id: search engine
gcs_engine_id: 33ef4cbe0703b4f3a

Expand Down
2 changes: 1 addition & 1 deletion config/_default/privacy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# See: https://gohugo.io/about/hugo-and-gdpr/
#
# googleAnalytics:
# ananymizIP: Enable anonymiation of IP addresses
# ananymizeIP: Enable anonymization of IP addresses
# disable: Set to true to disable googleAnalytics
# respectDoNotTrack: Check for Do Not Track in headers
# useSessionStorage: Store session information in storage and
Expand Down
8 changes: 6 additions & 2 deletions config/staging/hugo.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
baseURL: https://wasm.interlisp.org
baseURL: https://stumbo.github.io/InterlispDraft.github.io/

languageCode: en-us

# title
# Insert Staging Environment onto every page to make clear
# this is not the production site
title: 'Staging Environment'
publishDir: stage
4 changes: 4 additions & 0 deletions layouts/robots.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Production robots.txt
#
User-agent: *
Allow: /
5 changes: 4 additions & 1 deletion static/robots.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# Placeholder file. Overwritten in production by setting enableRobotsTXT to true
# See config/production/hugo.yaml
#
User-agent: *
Allow: /
Disallow: /