fix code #16
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
pwd | |
ls -ltr ./www-temp | |
# 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 to gh-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 # Target branch to deploy your site | |
keep_files: true # Set to false if you want to overwrite the existing content |