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

ci: add pull request previews #12

Merged
merged 1 commit into from
Feb 20, 2024
Merged

ci: add pull request previews #12

merged 1 commit into from
Feb 20, 2024

Conversation

jboix
Copy link
Contributor

@jboix jboix commented Feb 20, 2024

Description

Addresses SRGSSR/pillarbox-web#196 by introducing pull request previews using rossjrw/pr-preview-action. This new workflow enables us to review both visual and functional changes before merging.

The preview functionality work in the following manner:

  1. Triggering a Preview: Whenever a pull request is either opened, re-opened, or updated, the project undergoes a build process. The contents of the dist directory are copied under pr-preview/pr-${github.ref} located in the gh-pages branch.

  2. Cleaning Up: Once a pull request is closed, the corresponding preview folder (specific to the closed pull request) is deleted.

Changes made

  • The JamesIves/github-pages-deploy-action has been updated from version 3 to version 4. This update introduces the following configurations to this action:
    • force: false: This disables force push to the deployment branch.
    • clean-exclude: pr-preview/: This prevents the deletion of PR previews when the main branch is deployed.

@jboix jboix force-pushed the chore/add-pr-preview branch from 6c4cf04 to b35a81f Compare February 20, 2024 12:49
Copy link

github-actions bot commented Feb 20, 2024

PR Preview Action v1.4.7
Preview removed because the pull request was closed.
2024-02-20 15:57 UTC

@jboix jboix requested a review from amtins February 20, 2024 12:52
@jboix jboix force-pushed the chore/add-pr-preview branch from b35a81f to 80634ab Compare February 20, 2024 12:53
@jboix jboix changed the title chore(ci): add pull request previews ci: add pull request previews Feb 20, 2024
@jboix jboix force-pushed the chore/add-pr-preview branch from 80634ab to 41edd85 Compare February 20, 2024 13:26
Copy link
Member

@amtins amtins left a comment

Choose a reason for hiding this comment

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

LGTM!

Addresses SRGSSR/pillarbox-web#196 by introducing pull request previews using
`rossjrw/pr-preview-action`. This new workflow enables us to review both visual and functional
changes before merging.

The preview functionality work in the following manner:

1. **Triggering a Preview**: Whenever a pull request is either opened, re-opened, or updated, the
   project undergoes a build process. The contents of the `dist` directory are copied
   under `pr-preview/pr-${github.ref}` located in the `gh-pages` branch.

2. **Cleaning Up**: Once a pull request is closed, the corresponding preview folder (specific to the
   closed pull request) is deleted.

Additional workflow updates include:

- The `JamesIves/github-pages-deploy-action` has been updated from version 3 to version 4. This
  update introduces the following configurations to this action:
  - `force: false`: This disables force push to the deployment branch.
  - `clean-exclude: pr-preview/`: This prevents the deletion of PR previews when the main branch is
    deployed.
@jboix jboix force-pushed the chore/add-pr-preview branch from 41edd85 to 0b4f56f Compare February 20, 2024 15:55
@jboix jboix added this pull request to the merge queue Feb 20, 2024
Merged via the queue into main with commit 74829b0 Feb 20, 2024
2 checks passed
@jboix jboix deleted the chore/add-pr-preview branch February 20, 2024 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants