mat
mat

Reputation: 2617

GitHub actions: going through with pages-build-deployment

I have a GitHub page being deployed on my main repo (x.github.io). This website is being update through GitHub actions from others repo which pushes files to this main repo. The action pages-build-deployment is triggered each time there's a push to the main repo. However, some pushes take place close to one another, so the pages-build-deployment gets canceled and reruns in order to deploy the latest version of the website.

How can I stop this behavior so that it doesn't get canceled and instead finishes the current deployment?

enter image description here

Upvotes: 4

Views: 8004

Answers (2)

rrchtr
rrchtr

Reputation: 31

I have encountered the same problem. By default when you configure Github Pages it uses the pages-build-deployment action which is not modifiable. In my particular case I only want the action to be executed when there is a change in the folder that hosts the documentation of my project, for which the only solution is to use a custom workflow, as indicated in the documentation.

Github Pages Settings

As you can see in the image, in your repository settings, in the Pages section, under Build and deployment you can select the source, which is by default: Deploy from a branch and will use the classic pages-build-deployment workflow. The alternative option is to use Github Actions, so you can configure the process to your preference.

Upvotes: 3

Mark Davydov
Mark Davydov

Reputation: 447

You should try defining concurrency at your workflow.

ex.:

concurrency: 
  group: ${{ github.workflow }}
  cancel-in-progress: false

More info: here and here

Upvotes: 1

Related Questions