Skip to content

Commit

Permalink
ci(api-docs): use official github pages workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
elskow committed Nov 26, 2024
1 parent 762b83f commit 4e05996
Showing 1 changed file with 22 additions and 7 deletions.
29 changes: 22 additions & 7 deletions .github/workflows/api-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@ on:
workflow_dispatch:

jobs:
build-and-deploy:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

Expand Down Expand Up @@ -213,13 +212,11 @@ jobs:
path: docs/api
retention-days: 5

- name: Deploy to GitHub Pages
- name: Upload Pages artifact
if: github.ref == 'refs/heads/master'
uses: peaceiris/actions-gh-pages@v3
uses: actions/upload-pages-artifact@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs
force_orphan: true
path: docs

- name: Create Job Summary
run: |
Expand All @@ -238,3 +235,21 @@ jobs:
echo "5. Extract the zip file" >> $GITHUB_STEP_SUMMARY
echo "6. Open index.html in your browser" >> $GITHUB_STEP_SUMMARY
fi
deploy:
needs: build
if: github.ref == 'refs/heads/master'
runs-on: ubuntu-latest

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 4e05996

Please sign in to comment.