Skip to content

Commit

Permalink
GH-325: [Website] Update website deployment script to use latest LTS …
Browse files Browse the repository at this point in the history
…version of Node.js and Webpack 5.75.0 (#326)

# Overview

This pull request modifies the `apache/arrow-site` website deployment
workflow (`.github/workflows/deploy.yml`) to use the latest LTS version
of Node.js and Webpack 5.75.0 to work around the build issue described
in #325.

# Qualification

To qualify these changes, I:

1. Submitted these changes to the `main` branch of the
`mathworks/arrow-site` fork in order to trigger the `gh-pages`
deployment workflow. I then selected `gh-pages` as the GitHub Pages
deployment branch and verified that the site was deployed as expected to
https://mathworks.github.io/arrow-site/. For an example of a successful
workflow run, see:
https://github.com/mathworks/arrow-site/actions/runs/4313253336/jobs/7524824999.
2. I inspected the GitHub Actions workflow steps to ensure there are no
errors.
 
# Future Directions

1. While qualifying with the [fork deployment
workflow](https://github.com/apache/arrow-site#deployment), I realized
that I needed to [manually change the GitHub Pages deployment
branch](https://docs.github.com/en/pages/quickstart) from `asf-site` to
`gh-pages` in the "Pages" settings of the `mathworks/arrow-site` fork.
This wasn't immediately obvious, and it [isn't listed explicitly as a
required step in the
README.md](https://github.com/apache/arrow-site#deployment) of
`apache/arrow-site`. It would helpful to add an explicit note about this
step. I've captured this as #327 and addressed it with PR #328.
2. As described in the "Workarounds" section of the description of
#325, there is still more we could choose to do to
address the root cause of these build failures (the deprecation of the
`md4` hash algorithm in Node 18). This would include setting the
`output.hashFunction` to `xxhash64` for Webpack.
3. We could move the workflow into a container to make it easier to
reproduce the website build process on a local machine (see the
discussion in the comments on this pull request).

# Notes

1. Thank you @sgilmore10 for your help with this pull request!
2. Thank you to @avantgardnerio for your suggestion to move the
deployment workflow inside of an `ubuntu:latest` container!

Closes #325.

---------

Co-authored-by: Sarah Gilmore <sgilmore@mathworks.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
  • Loading branch information
3 people committed Mar 10, 2023
1 parent a2c45ab commit b955d79
Show file tree
Hide file tree
Showing 4 changed files with 380 additions and 406 deletions.
13 changes: 7 additions & 6 deletions .github/workflows/deploy.yml
Expand Up @@ -28,16 +28,17 @@ jobs:
name: Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: ruby/setup-ruby@v1
- name: Checkout git repository
uses: actions/checkout@v3
- name: Install Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- uses: actions/setup-node@v2
- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
cache: "npm"
- name: Install dependencies
run: |
bundle install
- name: Configure for production
run: |
echo "JEKYLL_BASE_URL=" >> ${GITHUB_ENV}
Expand Down
2 changes: 1 addition & 1 deletion .nvmrc
@@ -1 +1 @@
16
lts/*

0 comments on commit b955d79

Please sign in to comment.