起きているエラー
TypeScript × reactで開発しています。
pushした後のgithub上のActionsで下のエラーが発生します。
Run touch ./out/.nojekyll touch ./out/.nojekyll shell: /usr/bin/bash -e {0} touch: cannot touch './out/.nojekyll': No such file or directory Error: Process completed with exit code 1.
実現したいこと
・master branchにpushしたときにActionsが回る
・gh-pagesブランチがなかったら作られる
・gh-pagesをgithub pagesでデプロイする
github/workflows/
test.yml
1name: Test 2 3on: push 4 5jobs: 6 test: 7 name: Test 8 runs-on: ubuntu-latest 9 steps: 10 - uses: actions/checkout@v2 11 - name: setup Node.js 12 uses: actions/setup-node@v1 13 with: 14 node-version: 14 15 - uses: actions/cache@v2 16 id: client-yarn-cache 17 with: 18 path: 'node_modules' 19 key: client-yarn-${{ hashFiles('yarn.lock') }} 20 - run: yarn install 21 if: steps.client-yarn-cache.outputs.cache-hit != 'true' 22 - run: yarn lint 23 - run: yarn typecheck
deploy_client.yml
1name: Deploy client 2 3on: 4 push: co 5 branches: 6 - master 7 8jobs: 9 deploy: 10 name: Deploy 11 runs-on: ubuntu-latest 12 steps: 13 - uses: actions/checkout@v2 14 - uses: actions/setup-node@v1 15 with: 16 node-version: 14 17 - uses: actions/cache@v2 18 id: yarn-cache 19 with: 20 path: 'node_modules' 21 key: client-yarn-${{ hashFiles('yarn.lock') }} 22 - run: yarn install 23 if: steps.client-yarn-cache.outputs.cache-hit != 'true' 24 - run: yarn build 25 - run: touch ./out/.nojekyll 26 - uses: peaceiris/actions-gh-pages@v3 27 with: 28 github_token: ${{ secrets.GITHUB_TOKEN }} 29 publish_dir: ./out 30
試したこと
・masterブランチをそのままデプロイする
=>README.mdが表示される。
備考
不足している情報があれば追記するので教えていただきますようお願い致します。
回答ありがとうございます。回答を試して出Actionsでのエラーになります。
Run yarn build && touch ./out/.nojekyll yarn run v1.22.19 $ next build warn - No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache Attention: Next.js now collects completely anonymous telemetry regarding usage. This information is used to shape Next.js' roadmap and prioritize features. You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL: https://nextjs.org/telemetry info - Linting and checking validity of types... warn - The Next.js plugin was not detected in your ESLint configuration. See https://nextjs.org/docs/basic-features/eslint#migrating-existing-config info - Creating an optimized production build... info - Compiled successfully info - Collecting page data... info - Generating static pages (0/3) info - Generating static pages (3/3) info - Finalizing page optimization... Route (pages) Size First Load JS ┌ ○ / 41.3 kB 119 kB ├ /_app 0 B 78 kB └ ○ /404 182 B 78.2 kB + First Load JS shared by all 78.3 kB ├ chunks/framework-ed075df0e0b45174.js 45.5 kB ├ chunks/main-e7a7892cb0edc024.js 31 kB ├ chunks/pages/_app-26d2fe1e69b98d42.js 503 B ├ chunks/webpack-7e0a04d6d1a844f2.js 1.04 kB └ css/ab44ce7add5c3d11.css 247 B ○ (Static) automatically rendered as static HTML (uses no initial props) Done in 17.63s. touch: cannot touch './out/.nojekyll': No such file or directory Error: Process completed with exit code 1.
回答2件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。