mirror of
https://github.com/fastapi-admin/fastapi-admin.git
synced 2026-02-05 13:03:31 +08:00
47 lines
1.3 KiB
YAML
47 lines
1.3 KiB
YAML
name: deploy
|
|
on: [ push, pull_request ]
|
|
jobs:
|
|
examples:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Deploy
|
|
uses: appleboy/ssh-action@master
|
|
with:
|
|
host: ${{ secrets.HOST }}
|
|
username: ${{ secrets.USERNAME }}
|
|
key: ${{ secrets.KEY }}
|
|
port: ${{ secrets.PORT }}
|
|
script: |
|
|
cd /root/fastapi-admin/
|
|
git pull
|
|
docker-compose up -d --build
|
|
gh-pages:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-python@v1
|
|
with:
|
|
python-version: "3.x"
|
|
- name: Install and configure Poetry
|
|
uses: snok/install-poetry@v1.1.1
|
|
with:
|
|
virtualenvs-create: false
|
|
- name: Install deps
|
|
run: make deps
|
|
- name: Build en
|
|
run: cd docs/en && mkdocs build
|
|
- name: Deploy en
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: docs/en/site
|
|
- name: Build zh
|
|
run: cd docs/zh && mkdocs build
|
|
- name: Deploy zh
|
|
uses: peaceiris/actions-gh-pages@v3
|
|
with:
|
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_dir: docs/zh/site
|
|
destination_dir: zh
|
|
cname: fastapi-admin-docs.long2ice.cn
|