I was able to build both the JavaScript bundle, and the Go binary. But, I'm currently unable, due to lack of knowledge, to make the Go server run for the backend, and to display the public/index.html as the entry for the front-end.
How could I accomplish that, adding to the existing yaml file?
The repository: https://github.com/BuddhiLW/free-riding. The yaml file: https://github.com/BuddhiLW/free-riding/blob/main/.github/workflows/deploy.yaml
Current state of the Yaml file:
# This is a basic workflow to help you get started with Actions
name: CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
push:
branches: ["main"]
pull_request:
branches: ["main"]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
build:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
- name: Set Node.js 16.x
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Run install
uses: borales/actions-yarn@v4
with:
cmd: install # will run `yarn install` command
- name: Install Lynx
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: lynx
version: 1.0
- name: Prepare java
uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: "17"
- name: Install clojure tools
uses: DeLaGuardo/[email protected]
with:
# Install just one or all simultaneously
# The value must indicate a particular version of the tool, or use 'latest'
# to always provision the latest version
cli: latest # Clojure CLI based on tools.deps
- name: Generate js bundle
uses: borales/actions-yarn@v4
with:
cmd: run build
golang-server:
runs-on: ubuntu-latest
strategy:
matrix:
go: ["1.20.3"]
name: Go ${{ matrix.go }} sample
steps:
- uses: actions/checkout@v3
- name: Setup go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- run: |
go build
