name: Build and Deploy to Github Pages on: push: branches: [docs] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: jobs: build_and_deploy: runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 # Use GitHub Actions' cache to cache dependencies on servers - uses: actions/cache@v2 with: path: vendor/bundle key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }} restore-keys: | ${{ runner.os }}-gems- # Use GitHub Deploy Action to build and deploy to Github - uses: jeffreytse/jekyll-deploy-action@v0.3.1 with: provider: 'github' token: ${{ secrets.GITHUB_TOKEN }} # It's your Personal Access Token(PAT) jekyll_src: './docs' # Default is root directory