aboutsummaryrefslogtreecommitdiffhomepage
path: root/.github/workflows/nightly.yml
blob: 9b2caceb2126ada95bd044363d186266480b5551 (plain)
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Nightly Builds

on: [push, pull_request]

jobs:
  Linux:
    # AppImages should be built on the oldest possible version.
    # This should also match the version referenced in AppImage.yml.
    runs-on: ubuntu-20.04

    steps:

    - name: Git Clone
      uses: actions/checkout@v4.1.6

    - name: Update Repositories
      run: sudo apt-get update
    - name: Install Build Dependencies
      run: |
        # NOTE: The LDoc version from LuaRocks is just as old.
        # Also, it does not appear to contain a Markdown plugin as is claimed
        # in the documentation.
        sudo apt-get install -y rename lua-ldoc lua-discount

    - name: Build AppImage
      run: |
        wget -O pkg2appimage.AppImage \
                "https://github.com/AppImageCommunity/pkg2appimage/releases/download/continuous/pkg2appimage--x86_64.AppImage"
        chmod +x pkg2appimage.AppImage
        ./pkg2appimage.AppImage AppImage.yml
        cd out
        rename 's/.*\.glibc/Applause-nightly-glibc/' *.AppImage
        chmod a+x *.AppImage
    - name: Archive AppImage
      uses: pyTooling/Actions/releaser@v1.0.5
      with:
        token: ${{ secrets.GITHUB_TOKEN }}
        tag: nightly
        rm: true
        files: out/*.AppImage

    # We apparently cannot change what page is shown in index.html,
    # so we rename it to api.html and redirect in index.html.
    - name: Build Lua Documentation
      run: |
        ldoc -o api .
        echo '<html><head><meta http-equiv="refresh" content="0; URL=topics/README.md.html"/>' >doc/index.html
    - name: Publish Website
      run: |
        cd doc
        touch .nojekyll
        git init
        cp ../.git/config ./.git/config
        git add .
        git config --local user.email "Website@GitHubActions"
        git config --local user.name "GitHub Actions"
        git commit -a -m "update ${{ github.sha }}"
        git push -u origin +HEAD:gh-pages