Skip to content

Create mdbook.yml

Create mdbook.yml #5

Workflow file for this run

name: github pages

Check failure on line 1 in .github/workflows/gh-pages.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/gh-pages.yml

Invalid workflow file

Invalid type for `job.environment`
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
jobs:
build:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
steps:
- uses: actions/checkout@v4
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: 'latest'
- name: Setup Pages
id: pages
uses: actions/configure-pages@v4
- name: Build mdBook
run: mdbook build
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./build
depoy:
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