Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
34 changes: 23 additions & 11 deletions .github/workflows/manual_deploy.yml
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:
Expand All @@ -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