Automated_hello_world

Automate build and deploy of hugo academic theme with GitHub actions

Long time no see!

The time passes by quickly and the way how to deploy the latest information to this page vanishes too fast. So the solution is automation! Especially useful if you use one framework on multiple machines in worst case with different operating systems, etc.

So today I added a GitHub action to my repository containing this page of hugo with the academic theme. It works like charm!

Thanks to this Tutorial of Valerio Galano it was pretty easy. There was only one thing I had to fix to get the build and deploy automated:

As the academic theme needs the extended version of hugo I had to add extended: true to the setup routine of hugo. That’s it.

    - name: Setup Hugo
      uses: peaceiris/actions-hugo@v2
      with:
        hugo-version: '0.73.0'
        extended: true

Furthermore, there was some kind of issue so the file upload did not place the files where they should have been placed. But there was also no error message. So I decided to test another upload action:

    - name: Deploy
      uses: sebastianpopp/ftp-action@releases/v2
      with:
        host: ${{ secrets.FTP_HOST }}
        user: ${{ secrets.FTP_USER }}
        password: ${{ secrets.FTP_PASSWORD }}
        localDir: "public"
        remoteDir: "${{ secrets.UPLOAD_DIR }}"

Now I just have to edit the markdown and write some nice posts and after the file is commited, the rest is done by this GitHub action. So nice!

Research Scientist
Ph.D. Candidate

My research interests include service robotics, additive manufacturing and all kind of new technology.