Skip to content

Commit

Permalink
ci: switch API docs to modern GH Pages action
Browse files Browse the repository at this point in the history
  • Loading branch information
vilgotf committed Apr 10, 2023
1 parent 78fffa1 commit 36f9e03
Showing 1 changed file with 20 additions and 9 deletions.
29 changes: 20 additions & 9 deletions .github/workflows/deploy-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,18 @@ on:
- "twilight*/**"
- "Cargo.toml"

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

concurrency: "pages"

jobs:
deploy-docs:
environment:
name: api-documentation
url: ${{ steps.deployment.outputs.page_url }}
name: Deploy docs to gh-pages
runs-on: ubuntu-latest

Expand All @@ -36,14 +46,15 @@ jobs:
- name: Prepare docs
run: |
echo '<meta http-equiv="refresh" content="0;url=twilight/index.html">' > target/doc/index.html
- name: Setup Pages
uses: actions/configure-pages@v3

- name: Deploy docs
uses: peaceiris/actions-gh-pages@v3
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
deploy_key: ${{ secrets.ACTIONS_DEPLOY_KEY_BOT }}
publish_branch: gh-pages
publish_dir: target/doc
allow_empty_commit: true
cname: api.twilight.rs
user_name: "github-actions[bot]"
user_email: "github-actions[bot]@users.noreply.github.com"
path: target/doc

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

0 comments on commit 36f9e03

Please sign in to comment.