diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml deleted file mode 100644 index d3d0130..0000000 --- a/.github/workflows/deploy.yml +++ /dev/null @@ -1,62 +0,0 @@ -name: Deploy to GitHub Pages - -on: - push: - branches: [main] - workflow_dispatch: - -permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - build: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - - name: Install Rust - uses: dtolnay/rust-toolchain@stable - - - name: Cache cargo dependencies - uses: actions/cache@v4 - with: - path: | - ~/.cargo/bin - ~/.cargo/registry/index - ~/.cargo/registry/cache - ~/.cargo/git/db - target - key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} - restore-keys: | - ${{ runner.os }}-cargo- - - - name: Install mdbook and dependencies - run: | - cargo install mdbook --force || cargo install mdbook - cargo install mdbook-mermaid --force || cargo install mdbook-mermaid - - - name: Build documentation - run: cargo xtask deploy - - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - path: ./docs - - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 231155a..2ee0c35 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -24,6 +24,9 @@ jobs: - name: Install Rust uses: dtolnay/rust-toolchain@stable + - name: Configure GitHub Pages + uses: actions/configure-pages@v5 + - name: Cache cargo dependencies uses: actions/cache@v4 with: diff --git a/README.md b/README.md index 7343f85..7ea04f3 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,6 @@ cd c-cpp-book && mdbook serve --open # http://localhost:3000 ### Deployment -The site auto-deploys to GitHub Pages on push to `master` via `.github/workflows/pages.yml`. No manual steps needed. +The site auto-deploys to GitHub Pages on push to `main` via `.github/workflows/pages.yml`. No manual steps needed.