0

Situation

I am using GitHub Pages to display a simple landing page for my project with direct download links to artifacts generated by a GitHub Action. This information is pulled from the GitHub API via this syntax in the GitHub Pages index.md:

[Download Installer (Windows)]({{ site.github.releases[0].assets[1].browser_download_url }})

When I push to the master branch, I run an action that automatically releases new binaries as GitHub Releases. Unfortunately, the GitHub Pages page is being deployed at the same time, with the GitHub API still providing the previous release as the latest release.

GitHub Pages configuration

enter image description here

Deployment page:

enter image description here

Question(s)

How can I tell GitHub to only trigger a deployment of the GitHub Pages page after the release action has completed? Does an Action exist to trigger what GitHub seems to do automagically after each push? And is there a way to disable the automatic deployment so that the page only gets deployed after a (successful) release?

The only action keep getting to when googling is peaceiris/actions-gh-pages, but it seems to have been made to deploy web projects to GitHub Pages. Am I correct in thinking this, or is there a way to use this action to accomplish what I described?

Marv
  • 3,517
  • 2
  • 22
  • 47

1 Answers1

0

I'm not sure about GitHub's automagic Pages deploy, but if you're somehow able to replicate that into a job of its own in your workflow file, you can use the needs attribute to make the deploy job depend on the release job completing. The 2 jobs must be defined in the same .yml workflow file.

jidicula
  • 3,454
  • 1
  • 17
  • 38
  • 1
    That was the least of my problems, I solved my problem with an API call. See the linked duplicate question. Thank you anyways! – Marv Jan 22 '21 at 18:03