Skip to content

Commit

Permalink
Change workflow to generate a built site upon pushing to a branch
Browse files Browse the repository at this point in the history
  • Loading branch information
mvriel committed Dec 5, 2024
1 parent fd687e3 commit 2459de1
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 2 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: ci
on:
push:
branches:
- main
permissions:
contents: write
jobs:
Expand All @@ -21,5 +19,19 @@ jobs:
mkdocs-material-
- name: Install mkdocs with plugins
run: pip install mkdocs-material
# Only on feature branches
- name: build documentation
if: ${{ github.ref != 'refs/heads/main' }}
run: mkdocs build --clean --force
- name: Store build artefact
if: ${{ github.ref != 'refs/heads/main' }}
uses: actions/upload-artifact@v4
with:
retention-days: 3
name: site
path: |
site
# Only on main
- name: deploy documentation
if: ${{ github.ref == 'refs/heads/main' }}
run: mkdocs gh-deploy --clean --force
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
site

0 comments on commit 2459de1

Please sign in to comment.