Skip to content

Commit

Permalink
new workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Fir121 committed Apr 20, 2024
1 parent c86e0b4 commit faaf51c
Show file tree
Hide file tree
Showing 2 changed files with 46 additions and 8 deletions.
28 changes: 20 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,27 @@ on:
push:
branches:
- main
permissions:
contents: write
jobs:
deploy:
build-and-deploy:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- name: Checkout 🛎️
uses: actions/checkout@v4
- uses: actions/setup-python@v3

- name: Install and Build 🔧
run: |
pip install mkdocs-material
pip install mkdocs-same-dir
pip install pymdown-extensions
mkdocs build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
python-version: 3.x
- run: pip install mkdocs-material
- run: pip install mkdocs-same-dir
- run: pip install pymdown-extensions
- run: mkdocs gh-deploy --force
clean-exclude: pr-preview/
folder: site
force: false
26 changes: 26 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# .github/workflows/preview.yml
name: Deploy PR previews
concurrency: preview-${{ github.ref }}
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed
jobs:
deploy-preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: 3.x
- run: pip install mkdocs-material && pip install mkdocs-same-dir && pip install pymdown-extensions && mkdocs build
if: github.event.action != 'closed'
- uses: rossjrw/pr-preview-action@v1
with:
source-dir: site
preview-branch: gh-pages
umbrella-dir: pr-preview
action: auto

0 comments on commit faaf51c

Please sign in to comment.