Skip to content

fix syntax

fix syntax #31

Workflow file for this run

name: Convert Markdown to HTML
on:
push:
branches:
- main
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '^1.16'
- name: Install dependencies
run: go mod init blackfriday; go get github.com/russross/blackfriday/v2
- name: Convert Markdown to HTML
run: go run ./src/convert_md_2_html.go
- name: Find HTML Content and move to temp folder
run: |
mkdir -p www-temp
find platforms -type f -name \*.html | while read a; do mv $a ./www-temp/; done
# Setting up Git user to commit to the gh-pages branch
- name: Configure Git User
run: |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
git config --global user.name "GitHub Actions"
# Deploy to GitHub Pages
- name: Deploy no GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.WEBSITE_PAT }}
publish_dir: www-temp # Directory where HTML files are stored
publish_branch: gh-pages
keep_files: false
# Adding HTML CSS Headers
- name: Adding HTML CSS Headers
run: |
cd www-temp
ls -1| while read i; do cp header.html tmp.html; cat $i >> tmp.html; mv tmp.html $i; rm -f tmp.html; done