Skip to content

PR deploy testing #35

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

Merged
merged 4 commits into from
Aug 11, 2024
Merged

PR deploy testing #35

merged 4 commits into from
Aug 11, 2024

Conversation

yogeshpaliyal
Copy link
Member

@yogeshpaliyal yogeshpaliyal commented Aug 11, 2024

Fixes #34

Add GitHub Action to deploy PR on GitHub Pages.

  • Update src/App.tsx

    • Change BrowserRouter basename prop to use process.env.PUBLIC_URL.
  • Modify .github/workflows/pr-check.yml

    • Add permissions for pages: write and id-token: write.
    • Add step to set up Pages using actions/configure-pages@v4.
    • Add step to upload artifact using actions/upload-pages-artifact@v3.
    • Add step to deploy to GitHub Pages using actions/deploy-pages@v4.

For more details, open the Copilot Workspace session.

Fixes #34

Add GitHub Action to deploy PR on GitHub Pages.

* **Update `src/App.tsx`**
  - Change `BrowserRouter` `basename` prop to use `process.env.PUBLIC_URL`.

* **Modify `.github/workflows/pr-check.yml`**
  - Add permissions for `pages: write` and `id-token: write`.
  - Add step to set up Pages using `actions/configure-pages@v4`.
  - Add step to upload artifact using `actions/upload-pages-artifact@v3`.
  - Add step to deploy to GitHub Pages using `actions/deploy-pages@v4`.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/TechPaliyal/LibraryManagement/issues/34?shareId=XXXX-XXXX-XXXX-XXXX).
* **App.tsx**
  - Add a new route for the PR deployment URL (`/pr-deploy/:prNumber`).

* **.github/workflows/pr-check.yml**
  - Add a new job to deploy the PR to GitHub Pages.
  - Update the `environment` name to include the PR number.
  - Update the `url` to include the PR number.

* **.github/workflows/deploy.yml**
  - Add a new job to deploy the PR to GitHub Pages.
  - Update the `environment` name to include the PR number.
  - Update the `url` to include the PR number.
@yogeshpaliyal
Copy link
Member Author

Add new route for PR deployment URL and update GitHub Actions workflows

  • App.tsx

    • Add a new route for the PR deployment URL (/pr-deploy/:prNumber).
  • .github/workflows/pr-check.yml

    • Add a new job to deploy the PR to GitHub Pages.
    • Update the environment name to include the PR number.
    • Update the url to include the PR number.
  • .github/workflows/deploy.yml

    • Add a new job to deploy the PR to GitHub Pages.
    • Update the environment name to include the PR number.
    • Update the url to include the PR number.

@yogeshpaliyal yogeshpaliyal merged commit 1e42b01 into main Aug 11, 2024
@yogeshpaliyal yogeshpaliyal deleted the yogeshpaliyal/pr-deploy-testing branch August 11, 2024 11:56
yogeshpaliyal added a commit that referenced this pull request Aug 11, 2024
yogeshpaliyal added a commit that referenced this pull request Aug 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PR deploy testing
1 participant