Skip to content

fix the GitHub action files that lead to conflicts#78

Merged
yqtian-se merged 6 commits into
acmsigsoft:mainfrom
yqtian-se:main
Aug 24, 2025
Merged

fix the GitHub action files that lead to conflicts#78
yqtian-se merged 6 commits into
acmsigsoft:mainfrom
yqtian-se:main

Conversation

@yqtian-se
Copy link
Copy Markdown
Contributor

  • Update the README to include instructions for updating the website

The previous pull request preview workflow deployed directly to the
GitHub Pages environment, completely overwriting the existing site
content. This meant that generating a PR preview would take down the live
production site.

This commit modifies the preview workflow to make it non-destructive:

  • The workflow now first checks out the main branch and builds the full
    production site into the /public directory.
  • It then checks out the pull request's head branch and builds the
    specific PR preview into a subdirectory (e.g., /public/pr-123).
  • The combined result is then deployed, ensuring that the production site
    and the PR preview can coexist.

yqtian-se and others added 6 commits August 22, 2025 22:33
* Update pr-preview.yml

* Isolate PR previews to prevent overwriting production site

The previous pull request preview workflow deployed directly to the
      GitHub Pages environment, completely overwriting the existing site
      content. This meant that generating a PR preview would take down the live
      production site.

This commit modifies the preview workflow to make it non-destructive:

- The workflow now first checks out the `main` branch and builds the full
production site into the `/public` directory.
- It then checks out the pull request's head branch and builds the 
specific PR preview into a subdirectory (e.g., `/public/pr-123`).
- The combined result is then deployed, ensuring that the production site
and the PR preview can coexist.
The previous pull request preview workflow deployed directly to the GitHub Pages environment, completely overwriting the existing site content. This meant that generating a PR preview would take down the live production site.

This commit modifies the preview workflow to make it non-destructive:

- The workflow now first checks out the `main` branch and builds the full production site into the `/public` directory.
- It then checks out the pull request's head branch and builds the specific PR preview into a subdirectory (e.g., `/public/pr-123`).
- The combined result is then deployed, ensuring that the production site and the PR preview can coexist.

This change prevents conflicts between the preview and production deployment pipelines.
The Hugo build was creating the 'public' directory inside the checkout subdirectories instead of the workspace root. This caused the artifact upload step to fail.

This commit corrects the '--destination' flag for both Hugo build commands to use an absolute path, ensuring the build output is placed in the correct location.
@github-actions
Copy link
Copy Markdown

Preview deployed at: https://yqtian.com/acmsigsoft.github.io/pr-78

@CaptainEmerson CaptainEmerson requested a review from Copilot August 24, 2025 04:01
@yqtian-se yqtian-se merged commit 200cb4b into acmsigsoft:main Aug 24, 2025
3 checks passed
@yqtian-se yqtian-se review requested due to automatic review settings March 23, 2026 22:49
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.

2 participants