peaceiris / actions-hugo

GitHub Actions for Hugo ⚡️ Setup Hugo quickly and build your site fast. Hugo extended, Hugo Modules, Linux (Ubuntu), macOS, and Windows are supported.
https://github.com/marketplace/actions/hugo-setup
MIT License
1.37k stars 80 forks source link

proposal: Add support for timezone #620

Open fundor333 opened 1 year ago

fundor333 commented 1 year ago

Checklist

Describe your proposal

Add an option for set the timezone for the build. If I locate the site in Paris I need to add more action to the workflow

Describe the solution you'd like

I like something like this

  - name: Set up Hugo
    uses: peaceiris/actions-hugo@v2
    with:
      hugo-version: "latest"
      extended: true
      timezone: Europe/Paris

Describe alternatives you've considered

I considered use other action for set the timezone but it is more run time for the action

Additional context

No additional context

peaceiris commented 1 year ago

Could you try TZ env?

      - name: Build
        env: 
          TZ: "Asia/Tokyo"
        run: hugo