Skip to content

Merge pull request #5 from penwern/fix-curate-refs-in-urls #14

Merge pull request #5 from penwern/fix-curate-refs-in-urls

Merge pull request #5 from penwern/fix-curate-refs-in-urls #14

name: Deploy MkDocs to Soteria and Curate GitHub Pages
on:
push:
branches:
- main # Adjust if your primary branch differs
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install mkdocs mkdocs-material # Ensure all dependencies are listed
- name: Build and Deploy Curate Documentation
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdocs build --clean
cd site
git init
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add .
git commit -m 'Deploy Curate MkDocs Site'
git remote add origin https://x-access-token:${GITHUB_TOKEN}@github.com/penwern/curate-documentation.git
git push -f origin HEAD:gh-pages
- name: Generate and Modify Soteria+ Documentation
run: |
rm -rf soteria-plus-docs
mkdir soteria-plus-docs
cp -R docs/* soteria-plus-docs/
# Applying multiple sed replacements
find soteria-plus-docs/ -type f \( -name '*.md' -o -name '*.markdown' \) -exec sed -i -e 's/Curate/Soteria+/g' -e 's/Penwern/Max Communications/g' {} +
- name: Build and Deploy Soteria+ Documentation
env:
SOTERIA_PLUS_PAT: ${{ secrets.SOTERIA_PLUS_PAT }}
run: |
mkdocs build --clean --config-file mkdocs-soteria-plus.yml --site-dir soteria-plus-site
cd soteria-plus-site
git init
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add .
git commit -m 'Deploy Soteria+ MkDocs Site'
git remote add origin https://x-access-token:${SOTERIA_PLUS_PAT}@github.com/penwern/soteria-plus-documentation.git
git push -f origin HEAD:gh-pages