Skip to content

Commit

Permalink
Enable PR preview
Browse files Browse the repository at this point in the history
  • Loading branch information
vidister committed Feb 7, 2024
1 parent 22a4758 commit c4d4623
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 15 deletions.
15 changes: 0 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,3 @@ jobs:
uses: actions/upload-pages-artifact@v1
with:
path: ./site/
deploy:
if: github.event.repository.fork == false
needs: build
permissions:
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@v1

28 changes: 28 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
on:
push:
branches: ["gh-pages"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
deploy:
if: github.event.repository.fork == false
needs: build
permissions:
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@v1


26 changes: 26 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Deploy PR previews

on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed

concurrency: preview-${{ github.ref }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.x
- run: pip install mkdocs-material mkdocs-git-revision-date-localized-plugin
- run: mkdocs build
- name: Deploy preview
uses: rossjrw/pr-preview-action@v1
with:
source-dir: ./site/

0 comments on commit c4d4623

Please sign in to comment.