Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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/[email protected]       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

like image 527
KieranLewin Avatar asked May 24 '20 17:05

KieranLewin


People also ask

Why are my actions not running on GitHub?

So if you are copypasting actions from elsewhere, make sure that you are targeting the correct branch (for new repos this means most of the time to replace master with main in the . yml workflow files). If you are targeting the wrong branch, the name of the action will appear on GitHub but no actions will actually run.

How do you trigger a workflow?

Open the properties dialog and then select the Workflow tab. 2. All workflows assigned to the category or case definition will be listed. Select the workflow that should be started when a document is saved to this category and then click OK.


1 Answers

Is your branch master or main?

It might be silly in the future but as for October 2020 just keep in mind that the default GitHub branch has been renamed from master to main (source)

So if you are copypasting actions from elsewhere, make sure that you are targeting the correct branch (for new repos this means most of the time to replace master with main in the .yml workflow files).

If you are targeting the wrong branch, the name of the action will appear on GitHub but no actions will actually run.

Hope this helps someone during this transition!

like image 84
fr_andres Avatar answered Sep 23 '22 13:09

fr_andres