Auto-deploy next/latest docs
Some checks failed
Build and Deploy MkDocs / build-next (push) Failing after 27s
Some checks failed
Build and Deploy MkDocs / build-next (push) Failing after 27s
This commit is contained in:
parent
5ce09f3f60
commit
bb3dfc8d9f
@ -3,45 +3,56 @@ name: Build and Deploy MkDocs
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- public
|
- master
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-deploy:
|
build-next:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
container:
|
||||||
|
image: squidfunk/mkdocs-material
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Set up container
|
- name: Set up container
|
||||||
run: |
|
run: |
|
||||||
apt update
|
apk add --no-cache rsync openssh-client
|
||||||
apt install -y rsync
|
|
||||||
|
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Set up Python
|
|
||||||
uses: actions/setup-python@v5
|
|
||||||
with:
|
with:
|
||||||
python-version: '3.x'
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Install MkDocs
|
- name: Install MkDocs/Mike
|
||||||
run: |
|
run: |
|
||||||
pip install --upgrade pip
|
pip install mike
|
||||||
pip install mkdocs mkdocs-material pymdown-extensions mkdocs-material-extensions
|
|
||||||
|
|
||||||
- name: Build site
|
- name: Setup SSH keys
|
||||||
run: mkdocs build --clean
|
|
||||||
|
|
||||||
- name: Setup SSH
|
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.ssh
|
mkdir -p ~/.ssh
|
||||||
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_rsa
|
echo "${{ secrets.DEPLOY_SSH_KEY }}" > ~/.ssh/id_rsa
|
||||||
chmod 600 ~/.ssh/id_rsa
|
chmod 600 ~/.ssh/id_rsa
|
||||||
ssh-keyscan ${{ secrets.DEPLOY_HOST }} >> ~/.ssh/known_hosts
|
ssh-keyscan ${{ secrets.DEPLOY_HOST }} >> ~/.ssh/known_hosts
|
||||||
|
ssh-keyscan -p 2322 source.netsyms.com >> ~/.ssh/known_hosts
|
||||||
|
|
||||||
|
- name: Configure Git
|
||||||
|
run: |
|
||||||
|
git config user.name "CI"
|
||||||
|
git config user.email "ci@netsyms.com"
|
||||||
|
git remote set-url origin ssh://gitea@source.netsyms.com:2322/PostalPortal/PostalPoint_Plugins.git
|
||||||
|
|
||||||
|
- name: Deploy "next" version
|
||||||
|
run: |
|
||||||
|
mike deploy --push --update-aliases next latest
|
||||||
|
|
||||||
|
- name: Checkout public branch
|
||||||
|
run: |
|
||||||
|
git checkout public
|
||||||
|
|
||||||
- name: Deploy with rsync
|
- name: Deploy with rsync
|
||||||
run: |
|
run: |
|
||||||
rsync -rltz --no-perms --no-owner --no-group --omit-dir-times --delete \
|
rsync -rltz --no-perms --no-owner --no-group --omit-dir-times --delete \
|
||||||
--filter='P error/' \
|
--filter='P error/' \
|
||||||
--filter='P stats/' \
|
--filter='P stats/' \
|
||||||
site/ \
|
--exclude=".git/" \
|
||||||
|
./ \
|
||||||
${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:/var/www/dev.postalpoint.app/web
|
${{ secrets.DEPLOY_USER }}@${{ secrets.DEPLOY_HOST }}:/var/www/dev.postalpoint.app/web
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user