diff options
| author | 2021-12-06 21:20:27 +0400 | |
|---|---|---|
| committer | 2021-12-06 21:20:27 +0400 | |
| commit | cfe4d495f7e9581fe58576cdf5e5dd9a490e52ed (patch) | |
| tree | a3919899b8adbbed5822d40e2ab7dacfa084ab9c /.github/workflows | |
| parent | Merge pull request #1 from python-discord/mbaruh/setup (diff) | |
| parent | Move Doc Dependencies Into Dev Section (diff) | |
Merge pull request #2 from python-discord/docs-buildv1.1.0
Documentation
Diffstat (limited to '.github/workflows')
| -rw-r--r-- | .github/workflows/docs.yaml | 51 | 
1 files changed, 51 insertions, 0 deletions
diff --git a/.github/workflows/docs.yaml b/.github/workflows/docs.yaml new file mode 100644 index 00000000..8018d63c --- /dev/null +++ b/.github/workflows/docs.yaml @@ -0,0 +1,51 @@ +name: Build Docs + +on: +  push: +    branches: +      - main +  pull_request: +  workflow_dispatch: + +concurrency: +  group: docs-deployment-${{ github.ref }} +  cancel-in-progress: true + + +jobs: +  build-deploy: +    name: Build & Deploy Docs +    runs-on: ubuntu-latest + +    steps: +      - uses: actions/checkout@v2 + +      - name: Install Python Dependencies +        uses: HassanAbouelela/actions/setup-python@setup-python_v1.0.0 +        with: +          dev: true +          python_version: 3.9 + +      # Undeclared dependency for `releases`... whoops +      # https://github.com/bitprophet/releases/pull/82 +      - run: pip install six + +      - name: Generate AutoDoc References +        run: sphinx-apidoc -o docs/output botcore -fe + +      - name: Generate HTML Site +        run: sphinx-build -nW -j auto -b html docs docs/build + +      - name: Uplaod Build Artifact +        uses: actions/upload-artifact@v2 +        with: +          name: docs +          path: docs/build/* + +      - name: Deploy To GitHub Pages +        uses: JamesIves/[email protected] +        with: +          branch: docs +          folder: docs/build +          # We only want to actually push the build if we're on main, otherwise just make sure everything works +          dry-run: ${{ github.ref != 'refs/heads/main' }}  |