Is this meant to be used in conjunction with "Deploy from a branch"? #1476
-
"Deploy from a branch"? is in reference to the Github pages configuration option for the source. As opposed to "Github Actions". These are the two options in the Github Pages tab in the repo settings. Originally I thought this was supposed to be used in conjunction with the "Github Actions" (since this is a github action after all...) but it does not publish. I just want to avoid the extra action if I can help it. When using the "Github Actions" source, my action using It does work when using the "Deploy from a branch" option and using "gh-pages" as the root. My action using This is my gh action using name: Build and Deploy
on:
push:
branches: ["main"]
# Allows manually running from Actions tab
workflow_dispatch:
permissions:
contents: write
jobs:
build-and-deploy:
concurrency: # only run latest build-and-deploy job
group: pages
cancel-in-progress: true
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
- name: Install and Build 🔧
run: |
npm i
npm run build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist https://github.com/BlairCurrey/peggle-clone/blob/main/.github/workflows/build-and-deploy.yml#L1-L27 The "Github Action" option has a "Beta" tag - not sure how long it's been around. It might be the case that the answer to this question used to be self evident (there was no option) but ATM I think it could use explicitly stating in the docs. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
There's an underlying build job that GitHub Pages performs that has nothing to do with this action. They recently exposed it to the repo view, but they work independently. GitHub has a similar action to this that they have been developing, but like you said it's still in beta. |
Beta Was this translation helpful? Give feedback.
-
Hi @BlairCurrey, I think I have been in the same situation as you. It turns out that this deploy action is supposed to be used with the "Deploy from a branch" setting - you don't need to switch to the "Use Github Actions" setting. Thanks to @inorganik for making this clear here |
Beta Was this translation helpful? Give feedback.
Hi @BlairCurrey, I think I have been in the same situation as you. It turns out that this deploy action is supposed to be used with the "Deploy from a branch" setting - you don't need to switch to the "Use Github Actions" setting. Thanks to @inorganik for making this clear here