JamesIves/github-pages-deploy-action

Artifacts uploaded are not removed on server causing storage limit.

m-nathani opened this issue · 3 comments

I used the action to upload my website docs on github-pages. However, each deployment created an artifact of 2GB causing my storage on github to reach its max capacity.

Should there be a way to delete the artifacts in the action after it deploys to pages ?

Jebay commented

Hello @m-nathani
I had the same problem with my account so I added a step in my workflow 🧹

      - name: Delete artifact 🗑️
        uses: geekyeggo/delete-artifact@v2
        with:
          name: build_output

Hello @m-nathani
I had the same problem with my account so I added a step in my workflow 🧹

      - name: Delete artifact 🗑️
        uses: geekyeggo/delete-artifact@v2
        with:
          name: build_output

Hey @Jebay , fortunately I did the exact same thing .

However, moved away from GitHub page branch to custom actions provided by GitHub itself.

Really appreciate your help ❤️. Keep knowledge sharing spirit, it always increases the more we do 🙏

      - name: Setup Pages
        uses: actions/configure-pages@v3

      - name: Upload artifact
        uses: actions/upload-pages-artifact@v1
        with:
          path: 'docs'
          name: github-pages

      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v1
        with:
          artifact_name: github-pages

      # delete-artifact
      - name: Clean
        uses: geekyeggo/delete-artifact@v2
        with:
          name: github-pages
Jebay commented

Oh God !
I did not know that Github provides GHA for that.
Thanks a lot, I will migrate too.