Skip to content

Commit

Permalink
docs: deploy to phomo/ folder
Browse files Browse the repository at this point in the history
  • Loading branch information
loiccoyle committed Jan 18, 2025
1 parent c88e452 commit c17c7a0
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 4 deletions.
27 changes: 25 additions & 2 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
name: Checkout the repository
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
Expand All @@ -30,5 +31,27 @@ jobs:
uses: abatilo/actions-poetry@v2
- name: Install doc dependencies
run: poetry install --with docs
- name: Deploy docs
run: poetry run mkdocs gh-deploy --force
- name: Build docs
run: poetry run mkdocs build

- name: Checkout gh-pages branch
uses: actions/checkout@v4
with:
ref: gh-pages
path: gh-pages
- name: Deploy docs to /phomo
run: |
cd gh-pages
mkdir -p phomo
# Clear old files
rm -rf phomo/*
cp -r ../site/* phomo/
# pull the CNAME back out to the root
mv phomo/CNAME .
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Deploy docs to /phomo"
git push origin gh-pages
2 changes: 1 addition & 1 deletion docs/CNAME
Original file line number Diff line number Diff line change
@@ -1 +1 @@
phomo-docs.loiccoyle.com
docs.loiccoyle.com
2 changes: 1 addition & 1 deletion mkdocs.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
site_name: phomo
site_description: Python package and CLI utility to create photo mosaics.
site_author: Loic Coyle
site_url: https://phomo-docs.loiccoyle.com/
site_url: https://docs.loiccoyle.com/

repo_name: phomo
repo_url: https://github.com/loiccoyle/phomo
Expand Down

0 comments on commit c17c7a0

Please sign in to comment.