Skip to content

jeanlf is deploying gpac mkdocs wiki #34

jeanlf is deploying gpac mkdocs wiki

jeanlf is deploying gpac mkdocs wiki #34

name: mkdocs-deploy
run-name: ${{ github.actor }} is deploying gpac mkdocs wiki
on: [push, workflow_dispatch]
jobs:
deploy-mkdocs-wiki:
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: install mkdocs-material
run: pip install mkdocs-material
- name: build mkdocs
env:
GOOGLE_ANALYTICS_KEY: ${{secrets.GOOGLE_ANALYTICS_KEY}}
run: mkdocs build --clean -d dist/site
- name: create archive
run: cd dist/site && tar -cvzf ../site.$(git rev-parse --short HEAD).tar.gz .
- name: install ftp
run: sudo apt install lftp
- name: ftp upload
run: lftp -c "open -u ${{secrets.WIKI_FTP_USER}},${{secrets.WIKI_FTP_PASS}} ${{vars.WIKI_FTP_HOST}}; put dist/site.$(git rev-parse --short HEAD).tar.gz"