Skip to content

A simple GitHub Action for producing Pelican build artifacts compatible with GitHub Pages.

License

Notifications You must be signed in to change notification settings

SnDream/pelican-build-pages

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pelican-build-pages

A simple GitHub Action for producing Pelican build artifacts compatible with GitHub Pages.

Based on the following projects

jekyll-build-pages

pelican-to-github-pages

Usage

⚠️ No full testing at this time

A basic Pages deployment workflow with the pelican-build-pages action looks like this.

name: Build Pelican site
on:
 push:
   branches: ["main"]
permissions:
  contents: read
  pages: write
  id-token: write
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v4
      - name: Setup Pages
        uses: actions/configure-pages@v5
      - name: Build
        uses: SnDream/pelican-build-pages@v2
      - name: Upload artifact
        uses: actions/upload-pages-artifact@v3
  deploy:
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}

To write to a different destination directory, match the inputs of both the pelican-build-pages and upload-pages-artifact actions.

steps:
  - name: Build
    uses: actions/pelican-build-pages@v1
    with:
      destination: "./output"
  - name: Upload artifact
    uses: actions/upload-pages-artifact@v3
    with:
      path: "./output"

Action inputs

Input Default Description
source content The directory to build from
destination ./_site The directory to write output into
(this should match the path input of the actions/upload-pages-artifact action)
configfile pelicanconf.py Override the default pelicanconf.py config file
build_revision $GITHUB_SHA The SHA-1 of the Git commit for which the build is running
token $GITHUB_TOKEN The GitHub token used to authenticate API requests

License

The scripts and documentation in this project are released under the MIT License.

About

A simple GitHub Action for producing Pelican build artifacts compatible with GitHub Pages.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 73.4%
  • Dockerfile 26.6%