Skip to content

Commit

Permalink
Deploying Docs
Browse files Browse the repository at this point in the history
Moving deployment of documents into there down action based on merging
of PR's
  • Loading branch information
JimTools committed Dec 15, 2024
1 parent 4632506 commit 3f781ee
Show file tree
Hide file tree
Showing 2 changed files with 60 additions and 47 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: Publish Docs
on:
pull_request:
branches:
- main
- 1.x
types: [closed]

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Install PIP Dependencies
uses: actions/setup-python@v5
with:
cache: 'pip'
- run: python -m pip install -r ./docs/requirements.txt

- name: Build Docs
run: |
git fetch --tags
cd docs
mkdir _build
python build_docs.py
- name: Setup Pages
uses: actions/configure-pages@v5

- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './pages'
deploy:
needs: docs

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

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

runs-on: ubuntu-latest

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

47 changes: 0 additions & 47 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,6 @@ on:
pull_request:
workflow_dispatch:

concurrency:
group: "pages"
cancel-in-progress: false

jobs:
build:
strategy:
Expand Down Expand Up @@ -44,46 +40,3 @@ jobs:
token: ${{ secrets.CODECOV_TOKEN }}
slug: jimtools/jwt-auth

docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install PIP Dependencies
uses: actions/setup-python@v5
with:
cache: 'pip'
- run: python -m pip install -r ./docs/requirements.txt
- name: Build Docs
run: |
git fetch --tags
cd docs
mkdir _build
python build_docs.py
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: './pages'
deploy:
needs: docs

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

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

runs-on: ubuntu-latest

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 3f781ee

Please sign in to comment.