github pagesに自動でデプロイしたい

起きているエラー

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

name: Test on: push jobs: test: name: Test runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - name: setup Node.js uses: actions/setup-node@v1 with: node-version: 14 - uses: actions/cache@v2 id: client-yarn-cache with: path: 'node_modules' key: client-yarn-${{ hashFiles('yarn.lock') }} - run: yarn install if: steps.client-yarn-cache.outputs.cache-hit != 'true' - run: yarn lint - run: yarn typecheck

deploy_client.yml

name: Deploy client on: push: co branches: - master jobs: deploy: name: Deploy runs-on: ubuntu-latest steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v1 with: node-version: 14 - uses: actions/cache@v2 id: yarn-cache with: path: 'node_modules' key: client-yarn-${{ hashFiles('yarn.lock') }} - run: yarn install if: steps.client-yarn-cache.outputs.cache-hit != 'true' - run: yarn build - run: touch ./out/.nojekyll - uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} publish_dir: ./out

試したこと

・masterブランチをそのままデプロイする
=>README.mdが表示される。

備考

不足している情報があれば追記するので教えていただきますようお願い致します。

コメントを投稿

0 コメント