Skip to content

Commit

Permalink
Preview of GHA build
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF committed Jun 4, 2024
1 parent 8c531e0 commit c28356f
Show file tree
Hide file tree
Showing 4 changed files with 121 additions and 46 deletions.
16 changes: 8 additions & 8 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ notifications:
"content/foundation/board/*": [email protected]
"content/board/*": [email protected]

pelican:
notify: [email protected]
autobuild: preview/*
target: asf-site
theme: theme/apache
# N.B. currently the page count is also defined in the hourly cron job - go figure
minimum_page_count: 170
whoami: main
# pelican:
# notify: [email protected]
# autobuild: preview/*
# target: asf-site
# theme: theme/apache
# # N.B. currently the page count is also defined in the hourly cron job - go figure
# minimum_page_count: 170
# whoami: main

staging:
profile: ~
Expand Down
21 changes: 21 additions & 0 deletions .github/workflows/build-pelican.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Build a Pelican Website
on:
push:
# This prevents the workflow from running automatically on a new branch
# When creating a new site branch, please ensure that the push and checkout branches agree
# and that the action/pelican destination value is updated accordingly
branches: [ 'preview/ghabuild' ]
workflow_dispatch:
jobs:
build-pelican:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: 'preview/ghabuild'
- uses: apache/infrastructure-actions/pelican@main
with:
# Change this when changing ref or branches above!
destination: 'preview/ghabuild-staging'
gfm: 'true'
tempdir: '../output.tmp'
92 changes: 92 additions & 0 deletions pelicanconf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@

import datetime
# Basic information about the site.
SITENAME = 'Apache Software Foundation'
SITEDESC = 'The main website of the ASF'
SITEDOMAIN = 'www.apache.org'
SITEURL = 'https://www.apache.org'
SITELOGO = 'https://www.apache.org/images/logo.png'
SITEREPOSITORY = 'https://github.com/apache/www-site/blob/main/content/'
CURRENTYEAR = datetime.date.today().year
TRADEMARKS = 'Apache, the Apache feather logo are trademarks'
TIMEZONE = 'UTC'
# Theme includes templates and possibly static files
THEME = 'theme/apache'
# Specify location of plugins, and which to use
PLUGIN_PATHS = [ 'plugins', ]
# If the website uses any *.ezmd files, include the 'asfreader' plugin
PLUGINS = [ 'gfm', 'asfindex', 'consensual_youtube', 'asfgenid', 'asfdata', 'asfrun', 'asfreader', ]
# All content is located at '.' (aka content/ )
PAGE_PATHS = [ '.' ]
STATIC_PATHS = [ '.', ]
# Where to place/link generated pages

PATH_METADATA = '(?P<path_no_ext>.*)\\..*'

PAGE_SAVE_AS = '{path_no_ext}.html'
# Don't try to translate
PAGE_TRANSLATION_ID = None
# Disable unused Pelican features
# N.B. These features are currently unsupported, see https://github.com/apache/infrastructure-pelican/issues/49
FEED_ALL_ATOM = None
INDEX_SAVE_AS = ''
TAGS_SAVE_AS = ''
CATEGORIES_SAVE_AS = ''
AUTHORS_SAVE_AS = ''
ARCHIVES_SAVE_AS = ''
# Disable articles by pointing to a (should-be-absent) subdir
ARTICLE_PATHS = [ 'blog' ]
# needed to create blogs page
ARTICLE_URL = 'blog/{slug}.html'
ARTICLE_SAVE_AS = 'blog/{slug}.html'
# Disable all processing of .html files
READERS = { 'html': None, }

# Configure the asfgenid plugin
ASF_GENID = {
'unsafe_tags': True,
'metadata': True,
'elements': True,
'permalinks': True,
'tables': True,

'headings': True,
'headings_re': '^h[1-4]',


'toc': True,
'toc_headers': '^h[1-4]',

'debug': False,
}



# Configure the asfdata plugin
ASF_DATA = {
'data': 'asfdata.yaml',
'metadata': {
'site_url': SITEURL
},
'debug': False,
}


# Configure the asfrun plugin (initialization)
ASF_RUN = [ '/bin/bash get_calendar.sh', ]


# Configure the asfrun plugin (finalization)
ASF_POSTRUN = [ '/bin/bash pagefind.sh', ]


# Configure ignore files
IGNORE_FILES = [ 'README.md', 'interviews', 'include', '*.odt', ]



# Configure the asfindex plugin
ASF_INDEX = {
'index': '**',
}

38 changes: 0 additions & 38 deletions pelicanconf.yaml

This file was deleted.

0 comments on commit c28356f

Please sign in to comment.