Skip to content

Commit

Permalink
Try cleaner
Browse files Browse the repository at this point in the history
  • Loading branch information
jaxs-ribs committed Nov 20, 2023
1 parent f145e40 commit 1ff284e
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ name: Deploy static content to Pages
on:
push:
branches: ["main", "luc/test31"]

workflow_dispatch:

permissions:
Expand All @@ -16,20 +15,15 @@ concurrency:
cancel-in-progress: true

jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
build-docs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Graphviz
uses: ts-graphviz/setup-graphviz@v1
- name: Setup Pages
uses: actions/configure-pages@v2
- uses: pdm-project/setup-pdm@v3
name: Setup PDM
- name: Setup PDM
uses: pdm-project/setup-pdm@v3
with:
python-version: 3.10.0
architecture: x64
Expand All @@ -42,20 +36,29 @@ jobs:
run: pdm install --plugins && pdm install -d -G ci && pdm torch install cpu
- name: Build docs
run: cd docs && make deploy
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: doc-build
path: 'docs/_build/dirhtml'

deploy-and-upload:
deploy:
needs: build-docs
if: github.ref == 'refs/heads/main'
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Upload artifact
if: github.ref == 'refs/heads/main'
uses: actions/upload-pages-artifact@v1
- name: Checkout
uses: actions/checkout@v3
- name: Download artifact
uses: actions/download-artifact@v2
with:
# Upload entire repository
name: doc-build
path: 'docs/_build/dirhtml'
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main'
id: deployment
uses: actions/deploy-pages@v1

0 comments on commit 1ff284e

Please sign in to comment.