Skip to content

Commit

Permalink
work flow update
Browse files Browse the repository at this point in the history
  • Loading branch information
barajale committed Jan 23, 2025
1 parent b187694 commit 5ead554
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 76 deletions.
42 changes: 15 additions & 27 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,47 +3,35 @@ name: Deploy MkDocs to GitHub Pages
on:
push:
branches:
- SoftwareX # Adjust if your branch is different
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write
- SoftwareX # Adjust this if your default branch is not "main"

jobs:
# Build job
build:
deploy:
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository
- name: Checkout Code
uses: actions/checkout@v4
uses: actions/checkout@v3

# Step 2: Set up Python environment
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.9'

# Step 3: Install dependencies
- name: Install Dependencies
run: |
pip install mkdocs-material mkdocstrings # Add other plugins you use if needed
pip install mkdocs-material mkdocstrings
- name: Build MkDocs Documentation
# Step 4: Build the MkDocs site
- name: Build MkDocs
run: mkdocs build

- name: Upload Artifact
uses: actions/upload-pages-artifact@v3
with:
path: site # MkDocs output is in the 'site' directory by default

# Deploy job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
# Step 5: Deploy to GitHub Pages
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./site # MkDocs builds to "site" by default
49 changes: 0 additions & 49 deletions .github/workflows/jekyll-gh-pages.yml

This file was deleted.

0 comments on commit 5ead554

Please sign in to comment.