Replies: 2 comments 3 replies
-
As it stands pushing a single file in this regard isn't supported. Supporting such a thing would be considered a major version bump so there's a few things to consider.
I'm curious to learn more about your use case for this, and if there's a general consensus or not if this is something that multiple people want. In the interim you can push name: Build and Deploy
on: [push]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
uses: actions/checkout@v2
- name: Generate deployment folder
run: |
mkdir build
mv README.md build/README.md
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: main
repository-name: foobar/doc
folder: build # Deploy the newly created "build" folder. |
Beta Was this translation helpful? Give feedback.
-
You can control what gets deployed just with .gitignore. If you want to have some files in your repo but not your deployment, then you could copy an alternative .gitignore over the top of the normal .gitignore as a step before the deploy action. That's what I do - my normal .gitignore ignores dist/, and my deployment .gitignore ignores src/. |
Beta Was this translation helpful? Give feedback.
-
I have multiple cases where I'd like to deploy a file or files, not a folder; for example, a
README.md
. The following fails:with
It seems that the restriction to
folder
s could be lifted to allow for allpath
s, be it folders or files.Beta Was this translation helpful? Give feedback.
All reactions