github-actions

GitHub Action workflow not running


I have a GitHub action workflow file @ myrepo/.github/workflows/Build Webpage.yml it contains this:

name: Webpage Build

on:
  push:
    branches:
      - webpage 

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
    - uses: actions/checkout@v2
    - name: setup node
      uses: actions/setup-node@v2-beta
      with:
        node-version: '12'
    - name: install deps and predeploy
      run: |
        npm ci
        npm run predeploy
    - name: Deploy 
      uses: JamesIves/github-pages-deploy-action@3.5.2
      with:
        GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
        BRANCH: gh-pages
        FOLDER: build

When I push to the webpage branch nothing happens in the actions tab at all I can't tell if I have a syntax error or if something is completely not set up correctly, I have in past on this repo had errors relating to syntax like every step must define a 'uses' or 'run' key which to me shows Github does recognize the workflow


Solution

  • So as found in the comment below the post itself, if you want the workflow to run on branch x the .github folder must be on branch x and any other branch you want to trigger the workflow from