on: push
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: 8
- uses: nikeee/setup-pandoc@v1
- uses: gradle/gradle-build-action@v2
with:
arguments: build
build-root-directory: console
- run: |
mkdir -p dist/malds
echo "
">>"dist/malds/index.html"
for i in malds/*.md; do
noext=$(basename "$i" .md)
folder="dist/malds/$noext"
mkdir -p "$folder"
pandoc "$i" -o "$folder"/index.html
cat malds/extras.html >> "$folder"/index.html
printf '- %s
\n' "$noext" "$noext">>"dist/malds/index.html"
done
cat malds/extras.html >> "dist/malds/index.html"
echo "
">>"dist/malds/index.html"
mkdir -p dist
cp -r static/* dist
mkdir -p dist/beta
cp -r console/build/distributions/* dist/beta
- uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
cname: exhq.gay