ftd 0.2.0

ftd: FifthTry Document Format
Documentation
name: Deploy Site

on:
  push:
    branches: [ main ]
    paths:
    - '**.ftd'
  workflow_dispatch:
env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout main branch
        uses: actions/checkout@v2
      - uses: FranzDiebold/github-env-vars-action@v2
      - name: Running examples
        id: run_examples
        continue-on-error: false
        uses: actions-rs/cargo@v1
        with:
          command: run
      - uses: actions/upload-artifact@master
        with:
          name: TLD_BUILD
          path: docs/
      - name: build for tld
        id: build_tld
        run: |
          rm -rf docs/
  publish-tld:
    runs-on: ubuntu-latest
    needs: build
    steps:
      - name: Prepare `build` branch creation
        id: clone_main
        uses: actions/checkout@v2
      - name: Check if `build` branch exists
        id: branch_exists
        continue-on-error: true
        run: /usr/bin/git ls-remote --heads origin build | grep ""
      - name: Create branch if not exists
        id: create_branch
        if: steps.branch_exists.outcome != 'success'
        run: |
          git config --global user.email "actions-user@users.noreply.github.com"
          git config --global user.name "actions-user"
          git checkout --orphan build
          git reset --hard
          git commit --allow-empty -m "Initializing build branch"
          git push origin build
      - name: Checkout build branch
        uses: actions/checkout@v2
        if: steps.branch_exists.outcome == 'success'
        with:
          ref: build
      - run: /bin/rm -rf *
      - uses: actions/download-artifact@master
        with:
          name: TLD_BUILD
          path: .
      - uses: stefanzweifel/git-auto-commit-action@v4
        name: Commit changes to build branch
        with:
          commit_message: SSR build
          branch: build
          commit_options: '--no-verify --signoff'
          repository: .