vuepress icon indicating copy to clipboard operation
vuepress copied to clipboard

Last updated does not work when deployed using GitHub Actions

Open miwurster opened this issue 2 years ago • 1 comments

  • [x] I confirm that this is an issue rather than a question.

Bug report

When deploying the docs to GitHub Pages using the GitHub Action jenkey2011/vuepress-deploy@master the "Last updated" value is never shown. Instead, when building and serving the docs using yarn build locally it is working as expected.

Steps to reproduce

Setup the GitHub jenkey2011/vuepress-deploy@master to deploy to GitHub Pages:

name: Build and Deploy
on:
  - push
jobs:
  build-and-deploy:
    runs-on: ubuntu-20.04
    steps:
      - name: Checkout
        uses: actions/checkout@master
      - name: vuepress-deploy
        uses: jenkey2011/vuepress-deploy@master
        env:
          ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
          BUILD_SCRIPT: yarn && yarn build
          BUILD_DIR: src/.vuepress/dist

What is expected?

I would expect that also using the GitHub Action that the "Last updated" value is shown.

What is actually happening?

"Last updated" value is not shown. From what I see in the GitHub Action log is that the action does the right commands. Essentially it does the following:

yarn && yarn build
cd src/.vuepress/dist
git init
git commit [...]
git push -f [...]

Other relevant information

  • Output of npx vuepress info in my VuePress project:
Environment Info:

  System:
    OS: macOS 12.6
    CPU: (8) arm64 Apple M1
  Binaries:
    Node: 16.17.0 - ~/tools/planqk/bin/node
    Yarn: 1.22.19 - /opt/homebrew/bin/yarn
    npm: 6.14.17 - /opt/homebrew/opt/node@14/bin/npm
  Browsers:
    Chrome: 108.0.5359.124
    Edge: Not Found
    Firefox: 100.0
    Safari: 16.0
  npmPackages:
    @vuepress/core:  1.9.7
    @vuepress/theme-default:  1.9.7
    vuepress: ^1.5.3 => 1.9.7
  npmGlobalPackages:
    vuepress: Not Found

miwurster avatar Dec 22 '22 09:12 miwurster

I also have the same problem. Has it been resolved? It works fine when running yarn dev, but it does not work when building with github action.

mihyunLee avatar Sep 21 '23 12:09 mihyunLee