Skip to content

Commit

Permalink
docs: improves doc CI to avoid error occurred when creating PR due to…
Browse files Browse the repository at this point in the history
… permission lacking
  • Loading branch information
tkzt committed Dec 30, 2024
1 parent 16f8f6c commit 86bd289
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,13 @@ on:
pull_request:
branches: [ main ]

permissions:
contents: read
pages: write
id-token: write

jobs:
deploy:
environment:
name: github-pages
name: Documentation
build:
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Move manager out
run: mv ./manager/* ./
- name: Setup PDM
Expand All @@ -30,6 +24,18 @@ jobs:
run: pdm install -Gdoc
- name: Build documentation
run: pdm run mkdocs build --clean

deploy:
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
steps:
- uses: actions/checkout@v4
- name: Upload to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
Expand Down

0 comments on commit 86bd289

Please sign in to comment.