Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

About article lastUpdated #1522

Closed
4 tasks done
coderhzy opened this issue Oct 21, 2022 · 4 comments
Closed
4 tasks done

About article lastUpdated #1522

coderhzy opened this issue Oct 21, 2022 · 4 comments

Comments

@coderhzy
Copy link
Contributor

Is your feature request related to a problem? Please describe.

The last update time of the file is the file I modified one time, not the last update time of all files becomes the last commit time

Describe the solution you'd like

I through vitepress docs,https://vitepress.vuejs.org/guide/deploying#github-pages.And create deploy.yml inside .github/workflows . Even if I change a certain file, at this time commit and push, the workflow work is completed. At this time, the last update time of all articles on my page is changed to this commit time. I hope that only the specific files I submit this time will be updated. The latest modification time

Describe alternatives you've considered

No response

Additional context

No response

Validations

@brc-dd
Copy link
Member

brc-dd commented Oct 21, 2022

I hope that only the specific files I submit this time will be updated.

Yeah that should be happening. Like in VitePress' docs, https://vitepress.vuejs.org/guide/deploying has Last updated: 8/23/2022 while https://vitepress.vuejs.org/guide/markdown has Last updated: 10/21/2022 as the markdown.md file was updated in a commit today, while that deploying.md hasn't been updated in any commits of the last two months. Is something else happening for you? Can you provide a reproduction?

@coderhzy
Copy link
Contributor Author

https://github.com/codehzy/blog/blob/master/.github/workflows/release.yml . This is my blog action yml,Can you give me some advice

@brc-dd
Copy link
Member

brc-dd commented Oct 21, 2022

Can you try replacing first step by this:

- uses: actions/checkout@v3
  with:
    fetch-depth: 0

@coderhzy
Copy link
Contributor Author

Cool. You are my savior and I change my files as you say.The redeployment met my expectations.

name: release

on:
push:
branches:
- master

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-node@v3
with:
node-version: 16
cache: yarn
- run: yarn install --frozen-lockfile

  - name: Build
    run: yarn docs:build

  - name: Deploy
    uses: peaceiris/actions-gh-pages@v3
    with:
      github_token: ${{ secrets.BLOG_TOKEN }}
      publish_dir: docs/.vitepress/dist

brc-dd added a commit that referenced this issue Oct 21, 2022
`fetch-depth: 0` is necessary for last updated to work
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 21, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants