Comments (4)
I think modifying the example might be better than removing the configuration option. My reasoning for that is because it's not always a push event that triggers these workflows, so there may not be a ref available in the workflow env. Scheduled jobs for example is one case where GITHUB_REF
will be undefined.
The other option would be to remove the base branch configuration option and instead setup an example that uses actions/checkout
that checks out a specific branch before the action runs: https://github.com/actions/checkout#usage.
Do you have any preference? Also happy to review any PR's if you'd like to make the change.
from github-pages-deploy-action.
I see the scheduling issue, thanks for explaining.
Now that you mention it, it sounds more consistent and reusable to let the checkout action have full control over what ref/branch is built (rather than having env.BASE_BRANCH). However, this could cause development on other branches to cause extra builds on master. Are you suggesting to keep on.push.branches in the readme to alleviate this, or is there a better alternative?
Alternatively we could use GITHUB_SHA, which is automatically set to the latest commit on the default branch in a scheduled build.
from github-pages-deploy-action.
I've been thinking about this more and I think removing env.BASE_BRANCH
would end up causing some issues. The reason for this is that the action switches between the deployment branch and the base branch initially to ensure the branch it's deploying to actually exists: https://github.com/JamesIves/github-pages-deploy-action/blob/master/entrypoint.sh#L55-L68
I think modifying the README example to not specify a branch in on.push
would be better. The on.push
branch filtering is up to the person creating the workflow, and it isn't really related to how the action works so I can see how it just adds confusion.
We could also setup some redundancy, where if env.BASE_BRANCH
exists then it uses that, otherwise it falls back to GITHUB_REF
and then master
. This way there's one less config option and the action will work for all types of use cases.
from github-pages-deploy-action.
I've pushed a change to the README in pull request #26 if you'd like to take a look!
https://github.com/JamesIves/github-pages-deploy-action/blob/example/README.md
from github-pages-deploy-action.
Related Issues (20)
- Commit fails with "process '/usr/bin/git' failed with exit code 128" HOT 3
- Error: You must provide the action with a folder to deploy.
- This project is now deprecated
- GitHub Actions `set-output` command is deprecated and will be disabled soon HOT 2
- Reporting a vulnerability HOT 1
- `token` not being used sometimes HOT 2
- fatal: A branch named 'main' already exists. HOT 7
- Pushed file asyncapi.html gets renamed to index.html HOT 3
- Can't push folder in project HOT 2
- remote: Permission denied to github-actions[bot] HOT 1
- I have this problem, everyone can help me ? This is for a react project HOT 1
- Git config not found for centos:7 HOT 2
- Action succeeds even when push fails HOT 1
- GitHub Pages re-building with Jekyll despite .nojekyll present HOT 1
- A file is missing or not transferred to github pages HOT 5
- The directory you're trying to deploy named /home/runner/work/RivioxTweaks/RivioxTweaks/dist doesn't exist. HOT 1
- There is nothing to commit. Exiting early⦠HOT 1
- The deploy step encountered an error: The process '/usr/bin/git' failed with exit code 1 β HOT 3
- fatal: Authentication failed HOT 1
- Error: The deploy step encountered an error: The process '/usr/bin/git' failed with exit code 128 β HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from github-pages-deploy-action.