debug #47
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@v3 | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
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 | |
working-directory: ${{ github.workspace }} | |
- 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 | |
working-directory: ${{ github.workspace }} | |
# Adding HTML CSS Header | |
- name: Adding HTML CSS Header | |
run: | | |
cd www-temp | |
ls -ltr | |
mkdir css | |
cp ../src/css/*.html css | |
ls -ltrh css/ | |
#cp ../src/css/*.css . | |
#ls -1 | while read i; do cp css/header.html tmp.html; cat $i >> tmp.html; mv tmp.html $i; rm -f tmp.html; done | |
#ls -1 | while read i; do echo "-----------------"; cat $i; done | |
working-directory: ${{ github.workspace }} | |
# 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 | |