Skip to content

Merge pull request #1631 from Karry/visual-cache-flush #481

Merge pull request #1631 from Karry/visual-cache-flush

Merge pull request #1631 from Karry/visual-cache-flush #481

Workflow file for this run

name: Webpage
on:
push:
branches:
- master
paths-ignore:
- '.github/workflows/**'
jobs:
webpage:
name: webpage
runs-on: ubuntu-20.04
environment: SOURCEFORGE
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Update package list
run: sudo apt-get update
- name: Install additional tools
run: sudo apt-get install python3-pygments python-pygments doxygen lftp
- name: Download Hugo static webpage builder
run: wget https://github.com/gohugoio/hugo/releases/download/v0.83.1/hugo_0.83.1_Linux-64bit.deb
- name: Install Hugo
run: sudo dpkg -i hugo_0.83.1_Linux-64bit.deb
- name: Generate doxygen documentation
run: ( cat doxygen.cfg ; echo "OUTPUT_DIRECTORY=webpage/static/api-doc" ) | doxygen -
- name: Generate static webpages using Hugo
run: hugo --verbose
working-directory: webpage
- name: Pass sourforge certificate to lftp
run: mkdir -p ~/.ssh/ && echo "web.sourceforge.net ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA2uifHZbNexw6cXbyg1JnzDitL5VhYs0E65Hk/tLAPmcmm5GuiGeUoI/B0eUSNFsbqzwgwrttjnzKMKiGLN5CWVmlN1IXGGAfLYsQwK6wAu7kYFzkqP4jcwc5Jr9UPRpJdYIK733tSEmzab4qc5Oq8izKQKIaxXNe7FgmL15HjSpatFt9w/ot/CHS78FUAr3j3RwekHCm/jhPeqhlMAgC+jUgNJbFt3DlhDaRMa0NYamVzmX8D47rtmBbEDU3ld6AezWBPUR5Lh7ODOwlfVI58NAf/aYNlmvl2TZiauBCTa7OPYSyXJnIPbQXg6YQlDknNCr0K769EjeIlAfY87Z4tw==" >> ~/.ssh/known_hosts
- name: Copy webpage content to sourcforge page
run: ([ -n $SOURCEFORGE_USER ] && [ -n $SOURCEFORGE_PASSWORD ] && echo "Calling lftp..." && lftp -c "open --user $SOURCEFORGE_USER --password $SOURCEFORGE_PASSWORD sftp://web.sourceforge.net; cd /home/project-web/libosmscout/htdocs/; mirror --reverse --parallel=20 --overwrite --delete --verbose=3 public .")
working-directory: webpage
env:
SOURCEFORGE_USER: ${{ secrets.SOURCEFORGE_USER }}
SOURCEFORGE_PASSWORD: ${{ secrets.SOURCEFORGE_PASSWORD }}