-
Notifications
You must be signed in to change notification settings - Fork 871
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
The update in 5cbabe1 didn't provide for a .nojekyll file, which is necessary when publishing to GitHub Pages to avoid Jekyll messing with our statically generated documentation. Also added a user input to the manual deploy script which allows deploying from any past reference (tag or commit).
- Loading branch information
Showing
2 changed files
with
38 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -49,7 +49,16 @@ jobs: | |
ghpages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Checkout Source Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
path: md | ||
- name: Checkout Target Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
ssh-key: ${{ secrets.PAGES_DEPLOY_KEY }} | ||
repository: Python-Markdown/Python-Markdown.github.io | ||
path: target | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
|
@@ -60,15 +69,11 @@ jobs: | |
python -m pip install .[docs] | ||
- name: Build | ||
run: | | ||
cd md | ||
python -m mkdocs build --clean --verbose | ||
- name: Publish | ||
if: success() | ||
uses: cpina/github-action-push-to-another-repository@main | ||
env: | ||
SSH_DEPLOY_KEY: ${{ secrets.PAGES_DEPLOY_KEY }} | ||
with: | ||
source-directory: 'site' | ||
destination-github-username: 'Python-Markdown' | ||
destination-repository-name: 'Python-Markdown.github.io' | ||
user-name: ${{ github.actor }} | ||
target-branch: master | ||
run: | | ||
cd target | ||
git config user.email [email protected] | ||
python -m ghp-import --push --no-jekyll --branch=master ../md/site |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,30 @@ | ||
name: manual deploy | ||
|
||
on: | ||
workflow_dispatch | ||
workflow_dispatch: | ||
inputs: | ||
ref: | ||
description: 'The branch, tag or SHA to checkout and build.' | ||
type: string | ||
required: true | ||
default: master | ||
|
||
jobs: | ||
|
||
ghpages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Checkout Source Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ inputs.ref }} | ||
path: md | ||
- name: Checkout Target Repo | ||
uses: actions/checkout@v4 | ||
with: | ||
ssh-key: ${{ secrets.PAGES_DEPLOY_KEY }} | ||
repository: Python-Markdown/Python-Markdown.github.io | ||
path: target | ||
- name: Setup Python | ||
uses: actions/setup-python@v4 | ||
with: | ||
|
@@ -19,15 +35,11 @@ jobs: | |
python -m pip install .[docs] | ||
- name: Build | ||
run: | | ||
cd md | ||
python -m mkdocs build --clean --verbose | ||
- name: Publish | ||
if: success() | ||
uses: cpina/github-action-push-to-another-repository@main | ||
env: | ||
SSH_DEPLOY_KEY: ${{ secrets.PAGES_DEPLOY_KEY }} | ||
with: | ||
source-directory: 'site' | ||
destination-github-username: 'Python-Markdown' | ||
destination-repository-name: 'Python-Markdown.github.io' | ||
user-name: ${{ github.actor }} | ||
target-branch: master | ||
run: | | ||
cd target | ||
git config user.email [email protected] | ||
python -m ghp-import --push --no-jekyll --branch=master ../md/site |