chip_8 0.2.0

CHIP-8 virtual machine / emulator
Documentation
name: docs

on:
  push:
    branches:
      - master

jobs:
  docs:
    name: docs
    runs-on: ubuntu-latest
    steps:
      - name: checkout source code
        uses: actions/checkout@v2
        with:
          persist-credentials: false

      - name: install Rust
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: nightly
          override: true

      - name: build docs
        uses: actions-rs/cargo@v1
        with:
          command: doc
          args: --verbose --no-deps --all-features

      - name: finalize docs
        run: |
          CRATE_NAME=$(echo '${{ github.repository }}' | tr '[:upper:]' '[:lower:]' | cut -f2 -d"/")
          echo "<meta http-equiv=\"refresh\" content=\"0; url=${CRATE_NAME/-/_}\">" > target/doc/index.html
          touch target/doc/.nojekyll

      - name: upload as artifact
        uses: actions/upload-artifact@v2
        with:
          name: docs
          path: target/doc

      - name: deploy
        uses: JamesIves/github-pages-deploy-action@releases/v3
        with:
          ACCESS_TOKEN: ${{ secrets.GH_PAT }}
          BRANCH: gh-pages
          FOLDER: target/doc