[NX] Git Action yml NX build 시 These files don't exist: dist/ 문제 해결
https://mingg123.tistory.com/219
[GIT] git push 시 Sentry에 sourceMap 업로드 하기 (git yml 작성)
기존엔 sentry-cli 명령어를 이용하여 sourceMap을 업로드 하도록 했지만, 이제 배포할 때마다 버저닝을 하고싶어서 git push 할 때마다 업로드 하도록 설정하려고 한다. 우선 Git > Settings > Secrets and variab
mingg123.tistory.com
Git Action을 이용하여 Sentry에 Source Map을 업로드 하려고 했다.
실제 운영되고 있는 프로젝트는 NX 기반이기 때문에 NX Build를 이용해서 진행했는데
yml을 실행 할 때마다 해당 에러가 발생했다.
- name: NX Build
uses: mansagroup/nrwl-nx-action@v3
with:
targets: aws-build
affected: 'true'
분명 yarn nx build 를 이용하면 해당 경로에 dist/ 가 생성되는데 왜 저러는 걸까.. 내가 뭘 잘못했나 오랜 시간을 소요했다.
(한번 빌드되는데 10분 정도 걸림 ㅠㅠ)
우선 원인은 affected:true 옵션을 사용하게 되면 실제 코드에 반영사항이 있을 때만 빌드하고 dist/ 를 떨어뜨리는 것이다.
나는 계속 .yml 만 수정해서 반영했으니, 코드의 변경점이 없다고 판단해 빌드 된 파일의 결과물을 떨어뜨리지 않았던 것이다.
임의로 .tsx파일을 수정하고, 다시 yml을 수행해보니 알맞게 떨어졌다..!
https://github.com/MansaGroup/nrwl-nx-action
GitHub - MansaGroup/nrwl-nx-action: A GitHub Action to wrap Nrwl Nx commands in your workflows.
A GitHub Action to wrap Nrwl Nx commands in your workflows. - GitHub - MansaGroup/nrwl-nx-action: A GitHub Action to wrap Nrwl Nx commands in your workflows.
github.com