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

Fix GitHub pages deploy #666

Merged
merged 2 commits into from
Jul 18, 2023
Merged

Fix GitHub pages deploy #666

merged 2 commits into from
Jul 18, 2023

Conversation

VaiTon
Copy link
Member

@VaiTon VaiTon commented Jul 9, 2023

  • In Use Vite instead of CRA #663 I forgot to modify the build.sh script. This fixes it.
  • Now we're directly pushing to GitHub Pages with an action, instead of pushing to the branch.

@VaiTon VaiTon changed the title Fix build.sh script Fix GitHub pages deploy Jul 9, 2023
@github-actions github-actions bot added the GitHub Actions Pull requests that update GitHub Actions code label Jul 9, 2023
@VaiTon VaiTon requested a review from alexfauquette July 9, 2023 14:05
Comment on lines +39 to +47
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
path: 'dist'

- name: Deploy to github pages 🚀
if: github.ref == 'refs/heads/master'
uses: JamesIves/[email protected]
with:
branch: gh-pages # The branch the action should deploy to.
folder: build # The folder the action should deploy.
id: deployment
uses: actions/deploy-pages@v2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure to understand, the difference between the two

"Upload artifact" is uploading the dist folder. But then what is doing the actions/deploy-pages@v2?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To deploy to Github pages via an action you first need to upload an artifact with a specific name and then invoke the deploy-pages action. See https://github.com/actions/deploy-pages/tree/main#usage

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the explaination

@VaiTon VaiTon merged commit ea1b1be into master Jul 18, 2023
@VaiTon VaiTon deleted the fix-build branch July 18, 2023 20:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
GitHub Actions Pull requests that update GitHub Actions code
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants