Skip to content

Commit

Permalink
Merge pull request #1342 from yogeshojha/yogeshojha-patch-1
Browse files Browse the repository at this point in the history
Update github-pages-deploy.yml
  • Loading branch information
yogeshojha authored Jul 30, 2024
2 parents a143a64 + ac990d8 commit 3af4d21
Showing 1 changed file with 31 additions and 2 deletions.
33 changes: 31 additions & 2 deletions .github/workflows/github-pages-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,37 @@ jobs:
with:
node-version: '14'

- name: Copy README to index.md
run: cp README.md index.md
- name: Install marked (Markdown parser)
run: npm install marked

- name: Convert README to HTML
run: |
echo "<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset='UTF-8'>
<meta name='viewport' content='width=device-width, initial-scale=1.0'>
<title>reNgine Documentation</title>
<link rel='stylesheet' href='https://cdnjs.cloudflare.com/ajax/libs/github-markdown-css/5.1.0/github-markdown.min.css'>
<style>
.markdown-body {
box-sizing: border-box;
min-width: 200px;
max-width: 980px;
margin: 0 auto;
padding: 45px;
}
@media (max-width: 767px) {
.markdown-body {
padding: 15px;
}
}
</style>
</head>
<body class='markdown-body'>
$(node -e "const marked = require('marked'); const fs = require('fs'); console.log(marked.parse(fs.readFileSync('README.md', 'utf-8')))")
</body>
</html>" > index.html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
Expand Down

0 comments on commit 3af4d21

Please sign in to comment.