Skip to content

Commit

Permalink
Fix gh-pages symlink (#1625)
Browse files Browse the repository at this point in the history
It turns out that upload-artifacts strips broken symlinks:
actions/upload-artifact#93, so our approach of
generating a broken symlink that gets linked when it gets to gh-pages
doesn't work. We can work around this by using tarring the output before
uploading the artifacts, but it turns out that the "pages build and
deployment" action doesn't support broken symlinks either, because it
uses `--dereference` in its tar command:

<img width="680" alt="image"
src="https://github.com/WATonomous/infra-config/assets/5977478/c78c2152-f989-4dbc-84c2-daf9e4a89347">

The new strategy in this PR is to set up the symlinks only on master and
only in CI.
  • Loading branch information
ben-z authored Oct 31, 2023
1 parent fde31ba commit 4c6815c
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 5 deletions.
2 changes: 0 additions & 2 deletions next.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,7 @@ module.exports = withNextra({
// const withExportImages = require('next-export-optimize-images')
// module.exports = withExportImages(module.exports)


// Injected content via Sentry wizard below

const { withSentryConfig } = require("@sentry/nextjs");

module.exports = withSentryConfig(
Expand Down
3 changes: 0 additions & 3 deletions scripts/post-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ echo "Running post-build commands..."
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
PROJECT_DIR="$(dirname "$SCRIPT_DIR")"

# We deploy all other projects to _deployments. This allows us to visit them using /project instead of /_deployments/project.
ln -s "_deployments/onboarding-form" "$PROJECT_DIR/out/onboarding-form-test"

# Optimize images
# https://next-export-optimize-images.vercel.app/docs/getting-started
# Disabled for now, because the generated images are often larger than the originals.
Expand Down

0 comments on commit 4c6815c

Please sign in to comment.