Replies: 4 comments 11 replies
-
|
i agree |
Beta Was this translation helpful? Give feedback.
-
|
I've moved away from Here's the GitHub Actions workflow I use for deploying, in case it helps someone: name: deploy
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: github-pages
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: 3.x
cache: 'pip'
- name: Install dependencies
run: pip install -r requirements.txt
- name: Build
run: mkdocs build --clean
- name: Upload static files as artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./site/
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4 |
Beta Was this translation helpful? Give feedback.
-
|
As the maintainer of mike (the MkDocs multi-version wrapper that uses something like However, it's a depressing sign of the times in the software industry when the old way (a single command) is replaced with 40-odd lines of YAML soup. I don't know if it's really ProperDocs' responsibility to have a more concise way to deploy documentation, but it's certainly something occupying my mind as I consider the future of mike. (I'd really like mike to be able to handle multiple doc frameworks as well as multiple deploy targets, if only for my own selfish reasons.) |
Beta Was this translation helpful? Give feedback.
-
|
Here's my current thinking:
|
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Ever since the
gh-deploycommand was added has GitHub evolved significantly.First by the implementation of GitHub Actions, adding a CI/CD system one can use to automatically deploy their docs, and later with the ability to directly deploy to the GitHub Pages Environment, eliminating the need of having a
gh-pagesbranch to begin with.In fact, using the branch/folder aproach today is nothing more than using a pre-made Actions workflow from GitHub to deploy the site content.
The command was useful back when Actions and the direct deployment were not a thing, but today does it seem really dated and no longer like something needed, especially since it lacks any level of customization one may want to have when deploying sites, such as adding pages after build that MkDocs would've skipped/not included (dot-files f.e.).
So I propose that the
gh-deploycommand is being deprecated, adding a warning to inform that it's no longer recommended to be used.The only reason for it to still exist, is for maybe some inexperienced user wanting to quickly deploy their page to GitHub.
Tho, I feel like the command also shouldn't be called
gh-deployanymore. It makes it seem like it's only for GitHub, when in actuality it's kind of a glorified collection of Git Commands being run to commit and push to a specific branch, which can be altered anyways.So a more generic
deploycommand may be something else to consider. Tho, I would still argue, that such commands have become obsolete with GitHub Actions, Woodpecker-CI and Forgejo Actions existing and offering customization this command could never provide.tl;dr: Consider deprecating the
gh-deploycommand in favour of more customizable CI/CD setups.(Maybe even add a page in docs to include common setups for such systems?)
Beta Was this translation helpful? Give feedback.
All reactions