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

build error #20

Closed
3kis opened this issue May 13, 2023 · 4 comments
Closed

build error #20

3kis opened this issue May 13, 2023 · 4 comments

Comments

@3kis
Copy link

3kis commented May 13, 2023

according the ‘To get started’ steps:
after creating codespace associated with repo,
workflow occur a error :
image

the workflow file is below:

name: Deploy to Github Pages

on:
    push:
        branches: [master]
    pull_request:
        branches: [master]

jobs:
    build:
        runs-on: ubuntu-latest

        steps:
            - uses: actions/checkout@v2

            - name: Cache Hugo resources
              uses: actions/cache@v2
              env:
                  cache-name: cache-hugo-resources
              with:
                  path: resources
                  key: ${{ env.cache-name }}

            - uses: actions/setup-go@v2
              with:
                  go-version: "^1.17.0"
            - run: go version

            - name: Cache Go Modules
              uses: actions/cache@v2
              with:
                  path: |
                      ~/.cache/go-build
                      ~/go/pkg/mod
                  key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
                  restore-keys: |
                      ${{ runner.os }}-go-
            - name: Setup Hugo
              uses: peaceiris/actions-hugo@v2
              with:
                  hugo-version: "latest"
                  extended: true

            - name: Build
              run: hugo --minify --gc

            - name: Deploy 🚀
              uses: JamesIves/github-pages-deploy-action@4.1.4
              with:
                  branch: gh-pages
                  folder: public
                  clean: true
                  single-commit: true
@Nasjoe
Copy link

Nasjoe commented May 25, 2023

Same here :

Node.js 12 actions are deprecated. Please update the following actions to use Node.js 16: actions/checkout@v2, actions/cache@v2, actions/setup-go@v2. For more information see: https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/.

@CaiJimmy
Copy link
Owner

The temporary solution is to use Hugo 0.111.x in GitHub action while this gets fixed by Hugo: CaiJimmy/hugo-theme-stack#821 (comment)

@3kis
Copy link
Author

3kis commented May 30, 2023

oh, thanks !

@CaiJimmy
Copy link
Owner

This should now be fixed with 11da5cc

The reason was that GitHub changed the default permission for GitHub Actions to read-only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants