Skip to content

Commit

Permalink
Merge pull request #37 from Sydney-Informatics-Hub/gitpod
Browse files Browse the repository at this point in the history
Revert mkdocs deploy changes
  • Loading branch information
georgiesamaha authored Oct 9, 2024
2 parents f1ff847 + 3e673c6 commit 9a96ef2
Showing 1 changed file with 4 additions and 24 deletions.
28 changes: 4 additions & 24 deletions .github/workflows/mkdocs_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,46 +3,26 @@ on:
push:
branches:
- main

permissions:
contents: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

# Configure Git credentials for the GitHub Actions bot
- name: Configure Git Credentials
run: |
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
# Set up Python environment
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: actions/setup-python@v5
with:
python-version: 3.x

# Cache mkdocs-material installation for faster builds
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@v4
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
# Install mkdocs and mkdocs-material
- run: pip install mkdocs-material

# Fetch the latest changes from the gh-pages branch to avoid conflicts
- name: Fetch gh-pages branch
run: |
git fetch origin gh-pages
git checkout gh-pages || git checkout -b gh-pages origin/gh-pages
git merge origin/gh-pages || true # Handle any merge issues silently if they exist
# Deploy the site with MkDocs
- name: Deploy MkDocs to GitHub Pages
run: mkdocs gh-deploy --force
- run: pip install mkdocs-material
- run: mkdocs gh-deploy --force

0 comments on commit 9a96ef2

Please sign in to comment.