Git history is overriden by the build process #205
-
BehaviourI built a static site generator in python and use the git commit history of markdown files to display a "Last modified" date on the built website. When used locally, my build process works and display the date correctly. But when I used this github action, the git history seems to disappear entirely and the date displayed is the built date, Demo files
Expected behaviourThe date on the built page should be may 24. Actual behaviourThe date on the built page is May 29, Configuration
name: website
on: push
jobs:
publish:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Generate Chisai
run: python3 src/build.py --prod
#-
#name: Create cname file
# run: echo 'mydomain.com' > build/CNAME
-
name: Deploy to GitHub Pages
if: success()
uses: crazy-max/ghaction-github-pages@v2
with:
target_branch: gh-pages
build_dir: build
keep_history: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
LogsThanks for your help. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
This is the intended behavior of your configuration. You set https://github.com/crazy-max/ghaction-github-pages#inputs Even if |
Beta Was this translation helpful? Give feedback.
-
I'm gonna try this, thanks! |
Beta Was this translation helpful? Give feedback.
This is the intended behavior of your configuration. You set
keep_history: false
.https://github.com/crazy-max/ghaction-github-pages#inputs
Even if
keep_history
is set totrue
, this action would create a commit having the build date as date (and not some other date).