URL sur forge apps #67
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: Build and Publish Pages | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- uses: nikeee/setup-pandoc@v1 | |
- name: Convert with Pandoc | |
run: | | |
mkdir .public | |
for f in $(find . -type f -name '*.md' ! -name 'README.md'); do | |
filename=$(basename "$f" .md); | |
if [ ! -f "$filename.html" ]; then | |
pandoc -f markdown+mark+lists_without_preceding_blankline+emoji+hard_line_breaks -t html --lua-filter=pandoc/fr-nbsp.lua --lua-filter=pandoc/copies.lua "$f" -o ".public/$filename.html" -s --template=pandoc/template.html; | |
fi | |
done | |
cp -r * .public | |
mv .public public | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./public |