diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index c6ae8be13..5643e6194 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -2,31 +2,29 @@ name: github pages on: push: - paths: - - docs/** - - .github/workflows/docs.yml branches: - - master + - main + pull_request: jobs: - build-deploy: - runs-on: ubuntu-latest - environment: docs + deploy: + runs-on: ubuntu-20.04 + concurrency: + group: ${{ github.workflow }}-${{ github.ref }} steps: - uses: actions/checkout@v2 - name: Setup mdBook uses: peaceiris/actions-mdbook@v1 with: - mdbook-version: "0.4.10" + mdbook-version: '0.4.10' + # mdbook-version: 'latest' - - name: Build - run: cd docs && mdbook build -d ../build + - run: cd docs && mdbook build - - name: Deploy 🚀 - uses: JamesIves/github-pages-deploy-action@v4.2.3 + - name: Deploy + uses: peaceiris/actions-gh-pages@v3 + if: ${{ github.ref == 'refs/heads/main' }} with: - branch: gh-pages # The branch the action should deploy to. - folder: build # The folder the action should deploy. - clean: false - token: ${{ secrets.DEPLOY_KEY }} # let's pretend I don't need it for now + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./docs/book \ No newline at end of file