Skip to content

Deploy to GitHub Pages #1

Deploy to GitHub Pages

Deploy to GitHub Pages #1

Workflow file for this run

name: Deploy to GitHub Pages
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pandoc
run: sudo apt-get update && sudo apt-get install -y pandoc
- name: Create site directory
run: mkdir -p _site/raw
- name: Convert Markdown to HTML
run: |
base_dir="public/meetups"
for file in $(find "$base_dir" -name "*.md" -type f); do
rel_path="${file#$base_dir/}"
html_file="_site/${rel_path%.md}.html"
mkdir -p "$(dirname "$html_file")"
pandoc "$file" -o "$html_file"
done
- name: Copy raw Markdown files
run: cp -r public/meetups _site/raw/
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4