mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2026-06-14 17:36:40 +00:00
- Add src/distros.md with gallery rendering script - Add src/distros.js with distributions data (from distributionhub) - Add CSS styles for distribution cards - Update CI workflow to generate distros.js from actions - Add 154 TODO templates for missing distributions - Create symlink distros.md for website build
73 lines
1.7 KiB
YAML
73 lines
1.7 KiB
YAML
name: Build GitHub Pages from md files
|
|
on:
|
|
push:
|
|
paths:
|
|
- '*.md'
|
|
- 'docs/*.css'
|
|
- 'docs/*.js'
|
|
- .github/workflows/website.yml
|
|
workflow_dispatch:
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
outputs:
|
|
docs_changed: ${{ steps.diff.outputs.changed }}
|
|
steps:
|
|
- name: 🛎️ Checkout
|
|
uses: actions/checkout@v6
|
|
with:
|
|
fetch-depth: 2
|
|
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@v4
|
|
|
|
- name: Install Pandoc
|
|
run: sudo apt-get update && sudo apt-get install -y pandoc
|
|
|
|
- name: Generate distros.js from actions
|
|
run: |
|
|
# Generate distros.js from local actions files
|
|
./action --distros src/distros.js
|
|
echo "Generated distros.js with $(wc -l < src/distros.js) lines"
|
|
|
|
- name: Make pages
|
|
run: |
|
|
mkdir -p docs
|
|
./web-create -b
|
|
|
|
- name: Check if docs changed
|
|
id: diff
|
|
run: |
|
|
if git diff --quiet HEAD~1 HEAD -- docs/; then
|
|
echo "changed=false" >> "$GITHUB_OUTPUT"
|
|
else
|
|
echo "changed=true" >> "$GITHUB_OUTPUT"
|
|
fi
|
|
|
|
- name: Upload artifact
|
|
if: steps.diff.outputs.changed == 'true'
|
|
uses: actions/upload-pages-artifact@v4
|
|
with:
|
|
path: 'docs/'
|
|
|
|
deploy:
|
|
needs: build
|
|
if: needs.build.outputs.docs_changed == 'true'
|
|
runs-on: ubuntu-latest
|
|
environment:
|
|
name: github-pages
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
steps:
|
|
- name: Deploy to GitHub Pages
|
|
id: deployment
|
|
uses: actions/deploy-pages@v4
|