Skip to content

Commit

Permalink
Setup GitHub Actions to auto-publish README to GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
AnthonyByansi committed Jun 30, 2024
1 parent e9ed670 commit a93555c
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/ISSUE_TEMPLATE/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main
paths:
- README.md

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Generate index.html from README
run: |
echo '<!DOCTYPE html><html><head><meta charset="utf-8"><title>README</title></head><body>' > index.html
cat README.md | markdown >> index.html
echo '</body></html>' >> index.html
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./
keep_files: false

0 comments on commit a93555c

Please sign in to comment.