Github action and Github page

Hi everyone!

I am new to Github, and now just start to work on a Github page project, where I am trying to put a Godot game to Github page.

  • I checked a video that says I need to upload the whole Godot project to Github repository rather than export the game to Html file myself.
  • Then I will run an Action file (downloaded from the video link) to make a Github page with the game (see below). By studying the syntax of YAML, I can understand a part of it, but not fully. When I run the action, it failed at the Build stage with “Error: Process completed with exit code 1.”

Should I modify the Action file according to my project? Or there are other errors?
Thank you very much!

# Workflow to publish Godot HTML5 games to GitHub Pages
# This script assumes that the project itself is in a subdirectory "project". This 
# folder structure frees up the root of the repository to be used for non-project
# files, such as the README, build folder, or raw assets folder.
# Make sure your project is configured for Web export
# to the path `build/web`.

name: 'Publish to GitHub Pages'

  GODOT_VERSION: 3.2.2 # Remember to manually set image to this version below.

      - master

    runs-on: ubuntu-18.04

      image: barichello/godot-ci:3.2.2

      - name: Checkout
        uses: actions/checkout@v2

      - name: Move HTML5 templates into position
        run: |
          mkdir -v -p ~/.local/share/godot/templates
          mv /root/.local/share/godot/templates/${GODOT_VERSION}.stable ~/.local/share/godot/templates/${GODOT_VERSION}.stable
      - name: Create staging directory
        run: mkdir -v -p build/web

      - name: Build
        run: godot -v --export "HTML5" ../build/web/index.html project/project.godot

      - name: Deploy
        uses: peaceiris/actions-gh-pages@v3
          github_token: ${{ secrets.GITHUB_TOKEN }}
          publish_dir: ./build/web
          force_orphan: true
          user_name: 'github-ci[bot]'
          user_email: 'github-actions[bot]'
          commit_message: 'Publish to gh-pages'

At which command/step did the error occur?

in “deploy” of Github Action, it failed at the Build stage, and I don’t know what is “exit code 1” according to the YAML file.

I assume you mean the step named “Build”? In the case the error message means the godot command returned an exit code of 1. Any exit code other than zero generally means the command failed.

Hopefully the log contains information on why it failed.