lexerus 0.1.9

Simple annotated lexer
Documentation
name: Pages

on:
  push:
    branches: [ "master" ]
  pull_request:
    branches: [ "master" ]

env:
  CARGO_TERM_COLOR: always

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v4
    - name: Setup pages
      id: pages
      uses: actions/configure-pages@v4
    - name: Clean docs folder
      run: cargo clean --doc
    - name: Build docs
      run: cargo doc --no-deps --all-features
    - name: Add redirect
      run: echo '<meta http-equiv="refresh" content="0;url=lexerus/index.html">' > target/doc/index.html
    - name: Remove lock file
      run: rm target/doc/.lock
    - name: Upload artifact
      uses: actions/upload-pages-artifact@v3
      with:
        path: target/doc

  deploy:
    # Grant GITHUB_TOKEN the permissions required to make a Pages deployment
    permissions:
      pages: write      # to deploy to Pages
      id-token: write   # to verify the deployment originates from an appropriate source
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    needs: build
    if: github.ref == 'refs/heads/master'
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v4