Skip to content

Commit

Permalink
ci: config typedoc
Browse files Browse the repository at this point in the history
  • Loading branch information
guoxianzhe committed Nov 20, 2023
1 parent 7e82b38 commit 2cd4cd7
Showing 1 changed file with 7 additions and 40 deletions.
47 changes: 7 additions & 40 deletions .github/workflows/typedoc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,24 @@
name: TypeDoc

on:
# Runs on new releases
release:
types: [published]
push:
branches: [main]

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: 'pages'
cancel-in-progress: true
branches:
- main

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
environment: github-pages
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Setup
uses: ./.github/actions/setup
- name: Build TypeDoc
run: yarn doc
- name: Zip It Up 🤐
run: |
zip -r agora-react-native-rtm-docs.zip docs
- name: Upload Artifact ⬆️
uses: actions/upload-artifact@v3
with:
name: agora-react-native-rtm-docs.zip
path: agora-react-native-rtm-docs.zip
- name: Upload Doc Archive to GitHub release ⬆️
if: github.event.release
uses: svenstaro/[email protected]
with:
file: agora-react-native-rtm-docs.zip
asset_name: agora-react-native-rtm-docs.zip
tag: ${{ github.ref_name }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
# Upload docs directory
path: 'docs'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./docs

0 comments on commit 2cd4cd7

Please sign in to comment.