loading_bar 1.1.0

Simple CLI loading bar crate
Documentation
# This is a basic workflow to help you get started with Actions

name: github pages update

# Controls when the workflow will run
on:
  push:
    branches: [ "main" ]
  # Allows you to run this workflow manually from the Actions tab
  workflow_dispatch:

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
      - name: Install stable toolchain
        uses: actions-rs/toolchain@v1
        with:
          profile: minimal
          toolchain: stable
          override: true

      - name: git clone
        run: |
          git clone https://github.com/mendelsshop/loading_bar.git
          cd loading_bar

      # Runs a single command using the runners shell
      - name: cargo doc
        run: |
          cd loading_bar
          cargo doc --no-deps --all-features --release --all

      # Runs a set of commands using the runners shell
      - name: switch to gh-pages branch and copy docs
        run: |
          cd loading_bar
          mkdir ../gh_pages
          echo "made gh_pages dir"
          cp -r target/doc/* ../gh_pages/
          echo "copied docs to temp dir"
          git switch gh-pages
          ls -la
          echo "switched to gh-pages branch"
          ls ../gh_pages
          echo "listing gh-pages dir"
          cp -rf ../gh_pages/* doc
          echo "copied docs to gh-pages branch"

      - name: configure git
        run: |
          cd loading_bar
          git config user.name "github-actions"
          git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
      - name: commit gh_pages
        env:
          GITHUB_TOKEN: ${{ secrets.PUSH_TOKEN }}
        run: |
          cd loading_bar
          git add doc
          echo "Updateing gh-pages"
          git commit -m "Update docs"
          echo "Pushing to gh-pages"
          git remote set-url --push origin https://mendelsshop:$GITHUB_TOKEN@github.com/mendelsshop/loading_bar
          git branch 
          git push origin gh-pages