-
Notifications
You must be signed in to change notification settings - Fork 5
Ajouter une commande pour générer une prévisualisation du site d'une PR #151
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
Conversation
|
/preview |
|
@copilot how can i test it without merging this PR ? |
Pour tester ce workflow sans merger la PR, vous avez deux options :
on:
issue_comment:
types: [created]
workflow_dispatch:
inputs:
pr_number:
description: 'PR number to preview'
required: true
Note : Les workflows Voulez-vous que j'ajoute le support |
|
I have this error in my fork not sure why could you reuse the same build process we have in jekyll.yml ? |
Fixed in commit b67e503. The error occurred because the workflow had
The build now matches the main workflow while still deploying to surge.sh for previews. |
|
Testé sur mon fork: sunix#2 (comment) |
b67e503 to
64ab87b
Compare
|
@copilot is there a way not to replicate the build steps between jekyll.yml and preview-pr.yml so if i change the builds steps I do not have to redo the same changes in preview-pr.yml ? |
Yes! Fixed in commit d0bb64b. I've created a reusable workflow ( Changes to the build process only need to be made in Note: |
|
@copilot i am going to revert your last changes because it doesn't fix the build steps duplication and it was simpler before |
Reverted in commit 95f5971. I've removed the reusable workflow approach and restored the simpler structure:
The workflow is now back to the simpler, working version. |
95f5971 to
64ab87b
Compare
|
@copilot could you add a check so it fails if SURGE_TOKEN is not set ? saying it is mandatory to push to surge.sh with an account. and use the command surge login and surge token to generate one, add these env variable to the github action settings |
Co-authored-by: sunix <650571+sunix@users.noreply.github.com>
Added in commit 8f83f64. The workflow now includes a validation step that checks if
The check runs after the build step and before deployment. |
antoinesd
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Description
Implémente un workflow GitHub Actions qui permet de déployer automatiquement une prévisualisation du site sur surge.sh en commentant
/previewsur une PR.Changements
.github/workflows/preview-pr.yml: Workflow déclenché par commentaire/previewhttps://pr-{number}-sciam-preview.surge.shConfiguration requise
Ajouter le secret
SURGE_TOKENdans les paramètres du dépôt pour activer les déploiements.Comment générer le SURGE_TOKEN :
npm install -g surgesurge loginsurge tokenSURGE_TOKEN)Le workflow échouera avec un message d'erreur clair si le token n'est pas configuré.
Utilisation
Commenter
/previewsur une PR pour déclencher le build et le déploiement.Suivi revue article
Points à prendre en compte durant la relecture
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.