nlsdvl is deploying gpac mkdocs wiki #53
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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==9.5.44 | |
- 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" |