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:
345 with:345 with:
346 path: docs/wiki/346 path: docs/wiki/
347 347
348- publish-docs:348+ build-docs:
349 if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'niri-wm/niri'349 if: github.event_name == 'push' && github.ref == 'refs/heads/main' && github.repository == 'niri-wm/niri'
350 needs:350 needs:
351 - test351 - test
352- permissions:
353- contents: write
354 runs-on: ubuntu-24.04352 runs-on: ubuntu-24.04
355 steps:353 steps:
356 - uses: actions/checkout@v6354 - uses: actions/checkout@v6
@@ -376,14 +374,23 @@ jobs:
376 - name: Generate rustdoc documentation374 - name: Generate rustdoc documentation
377 run: cargo doc --no-deps -p niri-ipc375 run: cargo doc --no-deps -p niri-ipc
378 376
379- - run: mkdir -p publish/niri_ipc377+ - run: |
380- - run: cp -r ./target/doc/* ./publish/378+ mkdir -p publish/niri_ipc
381- - run: cp -r ./docs/site/* ./publish/379+ cp -r ./target/doc/* ./publish/
380+ cp -r ./docs/site/* ./publish/
382 381
383- - name: Deploy documentation382+ - name: Upload pages artifact
384- if: github.ref == 'refs/heads/main'383+ uses: actions/upload-pages-artifact@v5
385- uses: peaceiris/actions-gh-pages@v4
386 with:384 with:
387- github_token: ${{ secrets.GITHUB_TOKEN }}385+ path: ./publish
388- publish_dir: ./publish386+
389- force_orphan: true387+ 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