2023-10-23 13:36:59 +02:00
|
|
|
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
|
2023-10-27 13:45:31 +02:00
|
|
|
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
|
2023-10-23 13:36:59 +02:00
|
|
|
|
|
|
|
on:
|
|
|
|
# Runs on pushes targeting the default branch
|
|
|
|
push:
|
|
|
|
branches: ["main"]
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
|
|
|
|
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
|
|
|
|
concurrency:
|
|
|
|
group: "pages"
|
|
|
|
cancel-in-progress: false
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
# Build job
|
|
|
|
build:
|
2024-03-27 01:17:45 +01:00
|
|
|
name: "Build GitHub Pages Site"
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2023-10-23 13:36:59 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2023-10-25 00:13:07 +02:00
|
|
|
- name: Cached checkout
|
|
|
|
uses: nschloe/action-cached-lfs-checkout@v1
|
|
|
|
# Use these to explicitly include/exclude files:
|
|
|
|
# with:
|
|
|
|
# include: "*"
|
|
|
|
# exclude: ""
|
2024-03-27 01:53:01 +01:00
|
|
|
- name: Build the site in the jekyll/builder container
|
|
|
|
run: |
|
|
|
|
docker run \
|
|
|
|
-v ${{ github.workspace }}:/srv/jekyll -v ${{ github.workspace }}/_site:/srv/jekyll/_site \
|
|
|
|
jekyll/builder:latest /bin/bash -c "chmod -R 777 /srv/jekyll && jekyll build --future"
|
|
|
|
|
|
|
|
- name: Install packages
|
|
|
|
continue-on-error: true
|
|
|
|
run: |
|
|
|
|
docker pull sylhare/type-on-strap
|
|
|
|
docker pull sylhare/jekyll
|
2024-03-27 01:17:45 +01:00
|
|
|
|
|
|
|
- name: "Upload artifact"
|
2024-03-27 00:22:26 +01:00
|
|
|
uses: actions/upload-pages-artifact@v3
|
2024-03-27 01:17:45 +01:00
|
|
|
with:
|
|
|
|
path: _site/
|
2023-10-23 13:36:59 +02:00
|
|
|
|
|
|
|
# Deployment job
|
2024-03-27 01:17:45 +01:00
|
|
|
|
2023-10-23 13:36:59 +02:00
|
|
|
deploy:
|
2024-03-27 01:17:45 +01:00
|
|
|
name: "Deploy GitHub Pages Site"
|
|
|
|
if: github.event_name == 'push'
|
|
|
|
needs:
|
|
|
|
- build
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
|
|
|
|
2023-10-23 13:36:59 +02:00
|
|
|
environment:
|
|
|
|
name: github-pages
|
|
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
2024-03-27 01:17:45 +01:00
|
|
|
|
2023-10-23 13:36:59 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-03-27 01:17:45 +01:00
|
|
|
- name: "Deploy to GitHub Pages"
|
2023-10-23 13:36:59 +02:00
|
|
|
id: deployment
|
2024-03-27 00:22:26 +01:00
|
|
|
uses: actions/deploy-pages@v4
|
2024-03-27 01:17:45 +01:00
|
|
|
with:
|
|
|
|
error_count: 0
|