Skip to content

Commit

Permalink
docs(gh-pages): migrate site to jekyll format
Browse files Browse the repository at this point in the history
  • Loading branch information
ReenigneArcher committed Jan 5, 2025
1 parent 65878af commit 7d3271d
Show file tree
Hide file tree
Showing 9 changed files with 582 additions and 790 deletions.
71 changes: 29 additions & 42 deletions .github/workflows/update-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,60 +3,47 @@ name: Build GH-Pages

on:
pull_request:
branches: [master]
types: [opened, synchronize, reopened]
branches:
- master
types:
- opened
- synchronize
- reopened
push:
branches: [master]
branches:
- master
workflow_dispatch:

concurrency:
group: "${{ github.workflow }}-${{ github.ref }}"
cancel-in-progress: true

jobs:
update_pages:
prep:
runs-on: ubuntu-latest

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

- name: Checkout gh-pages
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of the personal token
fetch-depth: 0 # otherwise, will fail to push refs to dest repo

- name: Prepare gh-pages
run: |
# empty contents
rm -f -r ./gh-pages/*
# copy template back to pages
cp -f -r ./gh-pages-template/. ./gh-pages/
- name: Upload Artifacts
if: ${{ github.event_name == 'pull_request' || github.event_name == 'workflow_dispatch' }}
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: gh-pages
if-no-files-found: error # 'warn' or 'ignore' are also available, defaults to `warn`
path: |
${{ github.workspace }}/gh-pages
!**/*.git
- name: Deploy to gh-pages
if: >-
(github.event_name == 'push' && github.ref == 'refs/heads/master') ||
(github.event_name == 'workflow_dispatch')
uses: actions-js/[email protected]
with:
github_token: ${{ secrets.GH_BOT_TOKEN }}
author_email: ${{ secrets.GH_BOT_EMAIL }}
author_name: ${{ secrets.GH_BOT_NAME }}
directory: gh-pages
branch: gh-pages
force: false
message: sync gh-pages to ${{ github.sha }}
name: prep
path: gh-pages-template/
if-no-files-found: error
include-hidden-files: true
retention-days: 1

call-jekyll-build:
needs: prep
# todo: change to master
uses: LizardByte/LizardByte.github.io/.github/workflows/jekyll-build.yml@feat/build/use-jekyll-and-restyle-website
with:
site_artifact: 'prep'
target_branch: 'gh-pages'
clean_gh_pages: true
theme_ref: 'feat/build/use-jekyll-and-restyle-website' # todo: remove this line
secrets:
GH_BOT_EMAIL: ${{ secrets.GH_BOT_EMAIL }}
GH_BOT_NAME: ${{ secrets.GH_BOT_NAME }}
GH_BOT_TOKEN: ${{ secrets.GH_BOT_TOKEN }}
Binary file added gh-pages-template/assets/img/navbar-avatar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1,301 changes: 553 additions & 748 deletions gh-pages-template/index.html

Large diffs are not rendered by default.

0 comments on commit 7d3271d

Please sign in to comment.