forge
Explore
Log in

Don't you dare go Hollow

Modernize GH pages workflow

Browse files at this commit

f51d761c456d635084b2f117a9ccbe9b96ad5acaHigherOrderLogicParent: 8319322
  • ci
    • modernize GH pages workflow
Show full message
ci: modernize GH pages workflow
.github/workflows/ci.ymlmodified+19 -12
@@ -345,12 +345,10 @@ jobs:
345345 with:
346346 path: docs/wiki/
347347
348- publish-docs:
348+ build-docs:
349349 if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'niri-wm/niri'
350350 needs:
351351 - test
352- permissions:
353- contents: write
354352 runs-on: ubuntu-24.04
355353 steps:
356354 - uses: actions/checkout@v6
@@ -376,14 +374,23 @@ jobs:
376374 - name: Generate rustdoc documentation
377375 run: cargo doc --no-deps -p niri-ipc
378376
379- - run: mkdir -p publish/niri_ipc
380- - run: cp -r ./target/doc/* ./publish/
381- - run: cp -r ./docs/site/* ./publish/
377+ - run: |
378+ mkdir -p publish/niri_ipc
379+ cp -r ./target/doc/* ./publish/
380+ cp -r ./docs/site/* ./publish/
382381
383- - name: Deploy documentation
384- if: github.ref == 'refs/heads/main'
385- uses: peaceiris/actions-gh-pages@v4
382+ - name: Upload pages artifact
383+ uses: actions/upload-pages-artifact@v5
386384 with:
387- github_token: ${{ secrets.GITHUB_TOKEN }}
388- publish_dir: ./publish
389- force_orphan: true
385+ path: ./publish
386+
387+ publish-docs:
388+ runs-on: ubuntu-24.04
389+ needs:
390+ - build-docs
391+ permissions:
392+ id-token: write
393+ pages: write
394+ steps:
395+ - name: Deploy artifact to GitHub Pages
396+ uses: actions/deploy-pages@v5