Skip to content

nlsdvl is deploying gpac mkdocs wiki #5

nlsdvl is deploying gpac mkdocs wiki

nlsdvl is deploying gpac mkdocs wiki #5

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
env:
GOOGLE_ANALYTICS_KEY: ${{secrets.GOOGLE_ANALYTICS_KEY}}
run: pip install mkdocs-material
- name: build mkdocs
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"