-
Notifications
You must be signed in to change notification settings - Fork 82
39 lines (36 loc) · 1.95 KB
/
webpage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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 }}