From a1892c09a2f63de708e6dea743f3ee76295b78bd Mon Sep 17 00:00:00 2001 From: Nathan Hui Date: Thu, 18 Jan 2024 22:21:17 -0800 Subject: [PATCH 1/8] feat: Adds join redirect --- Gemfile | 1 + Gemfile.lock | 3 +++ _config.yml | 4 ++++ join | 5 +++++ 4 files changed, 13 insertions(+) create mode 100644 join diff --git a/Gemfile b/Gemfile index b06b1d8f..5470f619 100644 --- a/Gemfile +++ b/Gemfile @@ -15,6 +15,7 @@ gem "jekyll", "~> 4.3.3" group :jekyll_plugins do gem "jekyll-feed", "~> 0.12" gem "jekyll-seo-tag", "~> 2.6" + gem 'jekyll-redirect-from' end # Windows and JRuby does not include zoneinfo files, so bundle the tzinfo-data gem diff --git a/Gemfile.lock b/Gemfile.lock index 80df9700..026ee354 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -37,6 +37,8 @@ GEM webrick (~> 1.7) jekyll-feed (0.17.0) jekyll (>= 3.7, < 5.0) + jekyll-redirect-from (0.16.0) + jekyll (>= 3.3, < 5.0) jekyll-sass-converter (3.0.0) sass-embedded (~> 1.54) jekyll-seo-tag (2.8.0) @@ -91,6 +93,7 @@ DEPENDENCIES http_parser.rb (~> 0.6.0) jekyll (~> 4.3.3) jekyll-feed (~> 0.12) + jekyll-redirect-from jekyll-seo-tag (~> 2.6) tzinfo (>= 1, < 3) tzinfo-data diff --git a/_config.yml b/_config.yml index fac8a68e..93361ed5 100644 --- a/_config.yml +++ b/_config.yml @@ -37,6 +37,10 @@ permalink: /:categories/:title plugins: - jekyll-feed - jekyll-seo-tag + - jekyl-redirect-from + +whitelist: + - jekyll-redirect-from # Exclude from processing. # The following items will not be processed, by default. diff --git a/join b/join new file mode 100644 index 00000000..01f858ec --- /dev/null +++ b/join @@ -0,0 +1,5 @@ +--- +permalink: /join +redirect_to: + - https://docs.google.com/forms/d/e/1FAIpQLSdOa1xcK2mxjnEoOLQB_A0a0ERnyT_AGwdaxqG06R9meXnT5g/viewform +--- \ No newline at end of file From e4013678ef5982cddc72fd9dc7aebacd6bea19da Mon Sep 17 00:00:00 2001 From: Nathan Hui Date: Thu, 18 Jan 2024 22:22:24 -0800 Subject: [PATCH 2/8] docs: Adds deploy target --- README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d304a1c5..b27ab2c2 100644 --- a/README.md +++ b/README.md @@ -24,4 +24,6 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S ## Developer Get Started 1. Follow the instructions at https://jekyllrb.com/docs/installation/ to install the Jekyll generator on your machine. -2. Run `jekyll serve --livereload` in this repository root to deploy a live server to http://localhost:4000 or http://localhost:35729 +2. Run `jekyll serve --livereload --safe` in this repository root to deploy a live server to http://localhost:4000 or http://localhost:35729 + +Dev deployment target: https://ucsd-e4e.github.io/website2.0/ From 35557802adfb9808c1a8a2994431039c29adc06a Mon Sep 17 00:00:00 2001 From: Nathan Hui Date: Thu, 18 Jan 2024 22:28:41 -0800 Subject: [PATCH 3/8] ci: Adds list of gems for debugging --- .github/workflows/jekyll.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index cdc9ac07..606c35da 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -39,6 +39,8 @@ jobs: ruby-version: '3.2' # Not needed with a .ruby-version file bundler-cache: true # runs 'bundle install' and caches installed gems automatically cache-version: 0 # Increment this number if you need to re-download cached gems + - name: Checks Ruby Gems + run: gem list - name: Setup Pages id: pages uses: actions/configure-pages@v4 From da55898ae214edbb40a08df4aed0bace46cfa796 Mon Sep 17 00:00:00 2001 From: Nathan Hui Date: Thu, 18 Jan 2024 22:31:40 -0800 Subject: [PATCH 4/8] ci: Edits bundle list --- .github/workflows/jekyll.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index 606c35da..d358a857 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -40,7 +40,7 @@ jobs: bundler-cache: true # runs 'bundle install' and caches installed gems automatically cache-version: 0 # Increment this number if you need to re-download cached gems - name: Checks Ruby Gems - run: gem list + run: bundle list - name: Setup Pages id: pages uses: actions/configure-pages@v4 From 8000710d6721df9b76aa1e45c15644cce10ab721 Mon Sep 17 00:00:00 2001 From: Nathan Hui Date: Thu, 18 Jan 2024 22:47:18 -0800 Subject: [PATCH 5/8] ci: Fixes gem groups --- .github/workflows/jekyll.yml | 2 +- Gemfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index d358a857..ee976d2b 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -38,7 +38,7 @@ jobs: with: ruby-version: '3.2' # Not needed with a .ruby-version file bundler-cache: true # runs 'bundle install' and caches installed gems automatically - cache-version: 0 # Increment this number if you need to re-download cached gems + cache-version: 1 # Increment this number if you need to re-download cached gems - name: Checks Ruby Gems run: bundle list - name: Setup Pages diff --git a/Gemfile b/Gemfile index 5470f619..57a268e1 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ source "https://rubygems.org" # # This will help ensure the proper Jekyll version is running. # Happy Jekylling! -gem "jekyll", "~> 4.3.3" +gem "jekyll", "~> 4.3.3", group: :jekyll_plugins # If you want to use GitHub Pages, remove the "gem "jekyll"" above and # uncomment the line below. To upgrade, run `bundle update github-pages`. # gem "github-pages", group: :jekyll_plugins From 9d02ff38dcff9f6861bf2f9c4dde27078ff37373 Mon Sep 17 00:00:00 2001 From: Nathan Hui Date: Thu, 18 Jan 2024 23:04:49 -0800 Subject: [PATCH 6/8] ci: fixes build command --- .github/workflows/jekyll.yml | 2 +- Gemfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index ee976d2b..ea438662 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -46,7 +46,7 @@ jobs: uses: actions/configure-pages@v4 - name: Build with Jekyll # Outputs to the './_site' directory by default - run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" --config _config.yml,_dev_config.yml + run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}" --config _config.yml,_dev_config.yml --safe env: JEKYLL_ENV: production - name: Upload artifact diff --git a/Gemfile b/Gemfile index 57a268e1..5470f619 100644 --- a/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ source "https://rubygems.org" # # This will help ensure the proper Jekyll version is running. # Happy Jekylling! -gem "jekyll", "~> 4.3.3", group: :jekyll_plugins +gem "jekyll", "~> 4.3.3" # If you want to use GitHub Pages, remove the "gem "jekyll"" above and # uncomment the line below. To upgrade, run `bundle update github-pages`. # gem "github-pages", group: :jekyll_plugins From 64a0eeda0a12e0322c4ca855f6d9653d22a7e126 Mon Sep 17 00:00:00 2001 From: Nathan Hui Date: Thu, 18 Jan 2024 23:06:19 -0800 Subject: [PATCH 7/8] ci: Adds deploy protection --- .github/workflows/jekyll.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index ea438662..b64c8582 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -9,7 +9,6 @@ name: Deploy Jekyll site to Pages on: # Runs on pushes targeting the default branch push: - branches: ["main"] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: @@ -62,5 +61,6 @@ jobs: needs: build steps: - name: Deploy to GitHub Pages + if: ${{ github.ref == 'refs/heads/main' }} id: deployment uses: actions/deploy-pages@v4 From ca47af4706835a185d12a71d419d5a5ad2a168ee Mon Sep 17 00:00:00 2001 From: Nathan Hui Date: Thu, 18 Jan 2024 23:08:00 -0800 Subject: [PATCH 8/8] ci: only execute job on branch --- .github/workflows/jekyll.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/jekyll.yml b/.github/workflows/jekyll.yml index b64c8582..a9ccd6fe 100644 --- a/.github/workflows/jekyll.yml +++ b/.github/workflows/jekyll.yml @@ -59,8 +59,8 @@ jobs: url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest needs: build + if: ${{ github.ref == 'refs/heads/main' }} steps: - name: Deploy to GitHub Pages - if: ${{ github.ref == 'refs/heads/main' }} id: deployment uses: actions/deploy-pages@v4