Skip to content

Commit

Permalink
Update Documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
vicvalentim committed Oct 30, 2024
1 parent fd208f8 commit 9a7ff1f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 25 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/deploy_website.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
name: Deploy Website

name: deploy_website
on:
push:
branches:
- main

permissions:
contents: write

jobs:
deploy:
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: 3.x

- name: Install dependencies
run: |
pip install mkdocs-dracula-theme mkdocs-static-i18n[material] mkdocs-material
run: pip install mkdocs-dracula-theme mkdocs-static-i18n mkdocs-material

- name: Build website
run: mkdocs build
Expand Down
21 changes: 3 additions & 18 deletions .github/workflows/pr_preview.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
name: Deploy PR Preview

name: Deploy PR preview
on:
pull_request:
types:
- opened
- reopened
- synchronize
- closed

permissions:
contents: write
pull-requests: write
Expand All @@ -16,38 +14,25 @@ jobs:
deploy-preview:
concurrency: preview-${{ github.ref }}
runs-on: ubuntu-latest

steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
python-version: 3.x

- name: Install dependencies
run: |
pip install mkdocs-dracula-theme mkdocs-static-i18n[material] mkdocs-material
run: pip install mkdocs-dracula-theme mkdocs-static-i18n mkdocs-material

- name: Build website
if: github.event.action != 'closed'
run: mkdocs build

- name: Deploy preview
if: github.event.action != 'closed'
uses: rossjrw/pr-preview-action@v1
with:
source-dir: site
preview-branch: gh-pages
umbrella-dir: pr-preview

- name: Remove preview on PR close
if: github.event.action == 'closed'
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git checkout gh-pages
git rm -rf pr-preview/${{ github.event.pull_request.number }}
git commit -m "Remove preview for PR #${{ github.event.pull_request.number }}"
git push origin gh-pages

0 comments on commit 9a7ff1f

Please sign in to comment.