diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..6425d84e --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: +- package-ecosystem: github-actions + # Workflow files stored in the + # default location of `.github/workflows` + directory: / + schedule: + interval: daily + labels: + - github-actions + - dependencies diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml new file mode 100644 index 00000000..8a1d85d1 --- /dev/null +++ b/.github/workflows/pages.yml @@ -0,0 +1,56 @@ +# Workflow for building and deploying a mdBook site to GitHub Pages +name: GitHub Pages + +on: + # Runs on pushes targeting the default branch + push: + branches: [book] + + # Also runs on PR + pull_request: + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow one concurrent deployment +concurrency: + group: pages + cancel-in-progress: true + +jobs: + # Build job + build-book: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + - name: Setup mdBook + uses: peaceiris/actions-mdbook@v1 + with: + mdbook-version: '0.4.28' + # mdbook-version: 'latest' + - name: Build book + run: mdbook build book + - name: Upload artifact + uses: actions/upload-pages-artifact@v1 + with: + path: ./book + + # Deployment job + deploy: + if: github.event_name != 'pull_request' + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: [build-book] + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v2