|  | 
| 1 |  | -# This is a basic workflow to help you get started with Actions | 
|  | 1 | +name: Deploy mdBook site to Pages | 
| 2 | 2 | 
 | 
| 3 |  | -name: Auto gh-pages Deploy | 
| 4 |  | - | 
| 5 |  | -# Controls when the action will run.  | 
| 6 | 3 | on: | 
| 7 | 4 |   push: | 
| 8 |  | -    branches: [ master ] | 
|  | 5 | +    branches: [main] | 
|  | 6 | +  workflow_dispatch: # Allows you to run this workflow manually from the Actions tab | 
|  | 7 | + | 
|  | 8 | +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | 
|  | 9 | +permissions: | 
|  | 10 | +  contents: read | 
|  | 11 | +  pages: write | 
|  | 12 | +  id-token: write | 
| 9 | 13 | 
 | 
| 10 |  | -  # Allows you to run this workflow manually from the Actions tab | 
| 11 |  | -  workflow_dispatch: | 
|  | 14 | +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | 
|  | 15 | +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | 
|  | 16 | +concurrency: | 
|  | 17 | +  group: pages | 
|  | 18 | +  cancel-in-progress: false | 
| 12 | 19 | 
 | 
| 13 |  | -# A workflow run is made up of one or more jobs that can run sequentially or in parallel | 
| 14 | 20 | jobs: | 
| 15 |  | -  # This workflow contains a single job called "build" | 
| 16 | 21 |   build: | 
| 17 |  | -    # The type of runner that the job will run on | 
| 18 |  | -    runs-on: ubuntu-latest | 
| 19 |  | - | 
| 20 |  | -    # Steps represent a sequence of tasks that will be executed as part of the job | 
|  | 22 | +    runs-on: ubuntu-24.04 | 
| 21 | 23 |     steps: | 
| 22 |  | -      # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | 
| 23 |  | -      - uses: actions/checkout@v2 | 
| 24 |  | - | 
| 25 |  | -      - name: Setup mdBook | 
| 26 |  | -        uses: peaceiris/actions-mdbook@v1 | 
|  | 24 | +      - uses: actions/checkout@v4 | 
|  | 25 | +      - uses: peaceiris/actions-mdbook@v2 | 
| 27 | 26 |         with: | 
| 28 |  | -          mdbook-version: 'latest' | 
| 29 |  | - | 
| 30 |  | -      - name: Build mdbook | 
| 31 |  | -        run: mdbook build | 
| 32 |  | - | 
| 33 |  | -      - name: Deploy gh-pages | 
| 34 |  | -        uses: peaceiris/actions-gh-pages@v3 | 
|  | 27 | +          mdbook-version: latest | 
|  | 28 | +      - id: pages | 
|  | 29 | +        uses: actions/configure-pages@v5 | 
|  | 30 | +      - run: mdbook build | 
|  | 31 | +      - uses: actions/upload-pages-artifact@v3 | 
| 35 | 32 |         with: | 
| 36 |  | -          github_token: ${{ secrets.GITHUB_TOKEN }} | 
| 37 |  | -          publish_dir: ./book | 
| 38 |  | -          user_name: 'github-actions[bot]' | 
| 39 |  | -          user_email: 'github-actions[bot]@users.noreply.github.com' | 
| 40 |  | -          commit_message: 'Auto Deploy (${{ github.event.head_commit.message }})' | 
| 41 |  | -          cname: doc.rust-kr.org | 
|  | 33 | +          path: ./book | 
|  | 34 | + | 
|  | 35 | +  deploy: | 
|  | 36 | +    environment: | 
|  | 37 | +      name: github-pages | 
|  | 38 | +      url: ${{ steps.deployment.outputs.page_url }} | 
|  | 39 | +    runs-on: ubuntu-24.04 | 
|  | 40 | +    needs: build | 
|  | 41 | +    steps: | 
|  | 42 | +      - id: deployment | 
|  | 43 | +        uses: actions/deploy-pages@v4 | 
0 commit comments