Merge pull request #1 from infeeeee/dependabot/github_actions/dot-git… #50
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy website | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
# security: restrict permissions for CI jobs. | |
permissions: | |
contents: read | |
# Allow one concurrent deployment | |
concurrency: | |
group: "pages" | |
cancel-in-progress: true | |
jobs: | |
build: | |
name: Build documentation | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
name: Checkout | |
- uses: actions/setup-python@v4 | |
name: Setup Python | |
with: | |
python-version: ${{ vars.PYTHON_VERSION }} | |
- run: pip install -e .[doc] | |
name: Install deps | |
- run: pdoc -d google -o docs dyn2py | |
name: Generate docs | |
- uses: actions/upload-pages-artifact@v1 | |
name: Upload artifact | |
with: | |
path: docs/ | |
# Deploy the artifact to GitHub pages. | |
# This is a separate job so that only actions/deploy-pages has the necessary permissions. | |
deploy: | |
needs: build | |
name: Publish documentation | |
runs-on: ubuntu-latest | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
steps: | |
- id: deployment | |
name: Deploy page | |
uses: actions/deploy-pages@v1 |