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

EEXIST: file already exists #129

Closed
smoak opened this issue Nov 11, 2020 · 7 comments
Closed

EEXIST: file already exists #129

smoak opened this issue Nov 11, 2020 · 7 comments

Comments

@smoak
Copy link

smoak commented Nov 11, 2020

Behaviour

When I am deploying a directory I am getting this error:

EEXIST: file already exists, mkdir '/tmp/github-pages-3fqEIE/lib/absinthe/priv'

I am using mix (elixir's build tool) to build a release. After running, mix will create a _build/prod directory with all the files needed to run the app.

Expected behaviour

Deploys as usual

Actual behaviour

Error: EEXIST: file already exists, mkdir '/tmp/github-pages-3fqEIE/lib/absinthe/priv'

Configuration

name: Deploy
on:
  push:
    branches:
      - master
jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v1
      - name: Setup Elixir
        uses: actions/setup-elixir@v1.0.0
        with:
          otp-version: 22.x
          elixir-version: 1.9.x
      - name: Install Deps
        run: mix deps.get
      - name: Lint
        run: |
          mix format --check-formatted
          mix credo --ignore readability --strict
      - name: Test
        run: mix test --cover
        env:
          MIX_ENV: test
      - name: Build Relase
        if: success()
        run: mix release
        env:
          TC_PUBLIC_API_KEY: ${{ secrets.TC_PUBLIC_API_KEY }}
          TC_PRIVATE_API_KEY: ${{ secrets.TC_PRIVATE_API_KEY }}
          MIX_ENV: prod
      - name: Deploy
        if: success()
        uses: crazy-max/ghaction-github-pages@v2
        with:
          target_branch: production
          build_dir: _build/prod
          keep_history: true
          allow_empty_commit: false
          commit_message: "Production deploy"
          jekyll: false
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Logs

logs_9.zip

@crazy-max
Copy link
Owner

@smoak I've made some changes, can you try again with uses: crazy-max/ghaction-github-pages@master?

smoak added a commit to smoak/teamcowboy-graphql that referenced this issue Nov 11, 2020
Author of that action suggested using the master branch as they have
made changes.

See
crazy-max/ghaction-github-pages#129 (comment)
@smoak
Copy link
Author

smoak commented Nov 11, 2020

@smoak I've made some changes, can you try again with uses: crazy-max/ghaction-github-pages@master?

@crazy-max I made the change as you suggested:

diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 180dfb7..c40f19a 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -33,7 +33,7 @@ jobs:
           MIX_ENV: prod
       - name: Deploy
         if: success()
-        uses: crazy-max/ghaction-github-pages@v2
+        uses: crazy-max/ghaction-github-pages@master
         with:
           target_branch: production
           build_dir: _build/prod

but it broke the build completely with:

Unable to resolve action crazy-max/ghaction-github-pages@master, unable to find version master

https://github.com/smoak/teamcowboy-graphql/actions/runs/358638172

@crazy-max
Copy link
Owner

@smoak

Unable to resolve action crazy-max/ghaction-github-pages@master, unable to find version master

Oh sorry it's crazy-max/ghaction-github-pages@dev

@smoak
Copy link
Author

smoak commented Nov 11, 2020

@crazy-max Using dev branch now and I get the same error about the file already existing

Error: EEXIST: file already exists, mkdir '/tmp/github-pages-dyTkZv/lib/absinthe/priv'

https://github.com/smoak/teamcowboy-graphql/runs/1387772925?check_suite_focus=true#step:8:15

@crazy-max
Copy link
Owner

@smoak Ok thanks for your feedback, I will fork your repo and make some tests. Keep you in touch.

crazy-max added a commit that referenced this issue Nov 12, 2020
@crazy-max
Copy link
Owner

crazy-max commented Nov 12, 2020

@smoak This is actually an issue with your elixir build which creates symlinks that don't resolve to anything:

image

I've made some changes to display a warning message if issues like that are detected.

@smoak
Copy link
Author

smoak commented Nov 12, 2020

@crazy-max Thanks! I'll look into what's going on.

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

No branches or pull requests

2 participants