Skip to content
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

Creating the NewHelp site with a default Jekyll installation #49628

Merged
merged 26 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
f87cbac
First commit for NewHelp
quinthar Sep 23, 2024
bf2b7f9
Configured Jekyll action and build steps
quinthar Sep 24, 2024
288ccae
Slight updates from review
quinthar Sep 25, 2024
903aedf
Undoing suggested fix to see if it fixees worse syntax error
quinthar Sep 25, 2024
2b4f0d2
Added basic superapp page
quinthar Sep 25, 2024
808d5a9
Updated for custom plugin for deep linking
quinthar Sep 25, 2024
a452a8e
Removed Github pages dependency to get plugins
quinthar Sep 25, 2024
304fdb5
Trying to fix build issues in github acitons
quinthar Sep 25, 2024
c208034
More attempted fixes
quinthar Sep 25, 2024
216ded6
Explicitly installing Jekyll
quinthar Sep 25, 2024
aeadd2a
Explicitly installing ffi
quinthar Sep 25, 2024
0cfd840
More fixes
quinthar Sep 25, 2024
ee36a05
Reverted a bunch, trying again with better directory control
quinthar Sep 27, 2024
d65098e
Reverted a bunch, trying again with better directory control
quinthar Sep 27, 2024
ce36bfb
Removing cruft
quinthar Sep 27, 2024
6393350
Still working on working directory
quinthar Sep 27, 2024
29656b5
Still working on working directory
quinthar Sep 27, 2024
f71e207
Still working on working directory
quinthar Sep 27, 2024
d158e6d
Still working on working directory
quinthar Sep 27, 2024
843e099
Fixing validation error
quinthar Sep 27, 2024
689b355
With amazing updates from @rory
quinthar Sep 27, 2024
a2598c4
Whoops, missed ruby-version file
quinthar Sep 27, 2024
93385fc
Removing working directory from Ruby install so it finds the .ruby-ve…
quinthar Sep 27, 2024
ec8e29e
Moving .ruby-version to /help to keep install all in there
quinthar Sep 27, 2024
99beb83
Removing main commit hook per @rory's suggestion
quinthar Sep 27, 2024
4c45ce3
Fixed working directory
quinthar Sep 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/deployNewHelp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Deploy New Help Site

on:
# Run on any push to main that has changes to the help directory
# TEST: Verify Cloudflare picks this up even if not run when merged to main
# push:
# branches:
# - main
# paths:
# - 'help/**'

# Run on any pull request (except PRs against staging or production) that has changes to the help directory
pull_request:
roryabraham marked this conversation as resolved.
Show resolved Hide resolved
types: [opened, synchronize]
branches-ignore: [staging, production]
paths:
- 'help/**'

# Run on any manual trigger
workflow_dispatch:

# Allow only one concurrent deployment
concurrency:
group: "newhelp"
cancel-in-progress: false

jobs:
build:
env:
IS_PR_FROM_FORK: ${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork }}
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

# Set up Ruby and run bundle install inside the /help directory
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
roryabraham marked this conversation as resolved.
Show resolved Hide resolved
working-directory: ./help

- name: Build Jekyll site
run: bundle exec jekyll build --source ./ --destination ./_site
working-directory: ./help # Ensure Jekyll is building the site in /help

- name: Deploy to Cloudflare Pages
uses: cloudflare/pages-action@v1
id: deploy
if: env.IS_PR_FROM_FORK != 'true'
with:
apiToken: ${{ secrets.CLOUDFLARE_PAGES_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: newhelp
directory: ./help/_site # Deploy the built site

- name: Setup Cloudflare CLI
if: env.IS_PR_FROM_FORK != 'true'
run: pip3 install cloudflare==2.19.0

- name: Purge Cloudflare cache
if: env.IS_PR_FROM_FORK != 'true'
run: /home/runner/.local/bin/cli4 --verbose --delete hosts=["newhelp.expensify.com"] /zones/:9ee042e6cfc7fd45e74aa7d2f78d617b/purge_cache
env:
CF_API_KEY: ${{ secrets.CLOUDFLARE_TOKEN }}

- name: Leave a comment on the PR
uses: actions-cool/maintain-one-comment@v3.2.0
if: ${{ github.event_name == 'pull_request' && env.IS_PR_FROM_FORK != 'true' }}
with:
token: ${{ github.token }}
body: ${{ format('A preview of your New Help changes have been deployed to {0} :zap:️', steps.deploy.outputs.alias) }}

2 changes: 1 addition & 1 deletion .github/workflows/preDeploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ name: Process new code merged to main
on:
push:
branches: [main]
paths-ignore: [docs/**, contributingGuides/**, jest/**, tests/**]
paths-ignore: [docs/**, help/**, contributingGuides/**, jest/**, tests/**]

jobs:
typecheck:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/reassurePerformanceTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
pull_request:
types: [opened, synchronize]
branches-ignore: [staging, production]
paths-ignore: [docs/**, .github/**, contributingGuides/**, tests/**, '**.md', '**.sh']
paths-ignore: [docs/**, help/**, .github/**, contributingGuides/**, tests/**, '**.md', '**.sh']

jobs:
perf-tests:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sendReassurePerfData.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Send Reassure Performance Tests to Graphite
on:
push:
branches: [main]
paths-ignore: [docs/**, contributingGuides/**, jest/**]
paths-ignore: [docs/**, help/**, contributingGuides/**, jest/**]

jobs:
perf-tests:
Expand Down
5 changes: 5 additions & 0 deletions help/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
_site
.sass-cache
.jekyll-cache
.jekyll-metadata
vendor
1 change: 1 addition & 0 deletions help/.ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.3.4
25 changes: 25 additions & 0 deletions help/404.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
permalink: /404.html
layout: default
---

<style type="text/css" media="screen">
.container {
margin: 10px auto;
max-width: 600px;
text-align: center;
}
h1 {
margin: 30px 0;
font-size: 4em;
line-height: 1;
letter-spacing: -1px;
}
</style>

<div class="container">
<h1>404</h1>

<p><strong>Page not found :(</strong></p>
<p>The requested page could not be found.</p>
</div>
19 changes: 19 additions & 0 deletions help/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
source "https://rubygems.org"

gem "jekyll", "~> 4.3.4"
gem "minima", "~> 2.5"
gem "nokogiri"

group :jekyll_plugins do
gem "jekyll-feed", "~> 0.12"
end

# If using tzinfo-data for timezone support, ensure it's bundled for relevant platforms
platforms :mingw, :x64_mingw, :mswin, :jruby do
gem "tzinfo", ">= 1", "< 3"
gem "tzinfo-data"
end

gem "wdm", "~> 0.1", platforms: [:mingw, :x64_mingw, :mswin]
gem "http_parser.rb", "~> 0.6.0", platforms: [:jruby]

200 changes: 200 additions & 0 deletions help/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
GEM
remote: https://rubygems.org/
specs:
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
bigdecimal (3.1.8)
colorator (1.1.0)
concurrent-ruby (1.3.4)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
eventmachine (1.2.7)
ffi (1.17.0)
ffi (1.17.0-aarch64-linux-gnu)
ffi (1.17.0-aarch64-linux-musl)
ffi (1.17.0-arm-linux-gnu)
ffi (1.17.0-arm-linux-musl)
ffi (1.17.0-arm64-darwin)
ffi (1.17.0-x86-linux-gnu)
ffi (1.17.0-x86-linux-musl)
ffi (1.17.0-x86_64-darwin)
ffi (1.17.0-x86_64-linux-gnu)
ffi (1.17.0-x86_64-linux-musl)
forwardable-extended (2.6.0)
google-protobuf (4.28.2)
bigdecimal
rake (>= 13)
google-protobuf (4.28.2-aarch64-linux)
bigdecimal
rake (>= 13)
google-protobuf (4.28.2-arm64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.28.2-x86-linux)
bigdecimal
rake (>= 13)
google-protobuf (4.28.2-x86_64-darwin)
bigdecimal
rake (>= 13)
google-protobuf (4.28.2-x86_64-linux)
bigdecimal
rake (>= 13)
http_parser.rb (0.8.0)
i18n (1.14.6)
concurrent-ruby (~> 1.0)
jekyll (4.3.4)
addressable (~> 2.4)
colorator (~> 1.0)
em-websocket (~> 0.5)
i18n (~> 1.0)
jekyll-sass-converter (>= 2.0, < 4.0)
jekyll-watch (~> 2.0)
kramdown (~> 2.3, >= 2.3.1)
kramdown-parser-gfm (~> 1.0)
liquid (~> 4.0)
mercenary (>= 0.3.6, < 0.5)
pathutil (~> 0.9)
rouge (>= 3.0, < 5.0)
safe_yaml (~> 1.0)
terminal-table (>= 1.8, < 4.0)
webrick (~> 1.7)
jekyll-feed (0.17.0)
jekyll (>= 3.7, < 5.0)
jekyll-sass-converter (3.0.0)
sass-embedded (~> 1.54)
jekyll-seo-tag (2.8.0)
jekyll (>= 3.8, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.4)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
mercenary (0.4.0)
mini_portile2 (2.8.7)
minima (2.5.2)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
nokogiri (1.16.7)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.16.7-aarch64-linux)
racc (~> 1.4)
nokogiri (1.16.7-arm-linux)
racc (~> 1.4)
nokogiri (1.16.7-arm64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86-linux)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
public_suffix (6.0.1)
racc (1.8.1)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rexml (3.3.7)
rouge (4.4.0)
safe_yaml (1.0.5)
sass-embedded (1.79.3)
google-protobuf (~> 4.27)
rake (>= 13)
sass-embedded (1.79.3-aarch64-linux-android)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-aarch64-linux-gnu)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-aarch64-linux-musl)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-aarch64-mingw-ucrt)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-arm-linux-androideabi)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-arm-linux-gnueabihf)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-arm-linux-musleabihf)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-arm64-darwin)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-riscv64-linux-android)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-riscv64-linux-gnu)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-riscv64-linux-musl)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-x86-cygwin)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-x86-linux-android)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-x86-linux-gnu)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-x86-linux-musl)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-x86-mingw-ucrt)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-x86_64-cygwin)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-x86_64-darwin)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-x86_64-linux-android)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-x86_64-linux-gnu)
google-protobuf (~> 4.27)
sass-embedded (1.79.3-x86_64-linux-musl)
google-protobuf (~> 4.27)
terminal-table (3.0.2)
unicode-display_width (>= 1.1.1, < 3)
unicode-display_width (2.6.0)
webrick (1.8.2)

PLATFORMS
aarch64-linux
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure why so many platforms here ... none of our other Gemfile.locks have so many platforms. Not sure if it matters though 🤷🏼

aarch64-linux-android
aarch64-linux-gnu
aarch64-linux-musl
aarch64-mingw-ucrt
arm-linux-androideabi
arm-linux-gnu
arm-linux-gnueabihf
arm-linux-musl
arm-linux-musleabihf
arm64-darwin
riscv64-linux-android
riscv64-linux-gnu
riscv64-linux-musl
ruby
x86-cygwin
x86-linux
x86-linux-android
x86-linux-gnu
x86-linux-musl
x86-mingw-ucrt
x86_64-cygwin
x86_64-darwin
x86_64-linux
x86_64-linux-android
x86_64-linux-gnu
x86_64-linux-musl

DEPENDENCIES
http_parser.rb (~> 0.6.0)
jekyll (~> 4.3.4)
jekyll-feed (~> 0.12)
minima (~> 2.5)
nokogiri
tzinfo (>= 1, < 3)
tzinfo-data
wdm (~> 0.1)

BUNDLED WITH
2.5.19
7 changes: 7 additions & 0 deletions help/_config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
title: New Expensify Help
email: concierge@expensify.com
description: Comprehensive help documentation for New Expensify.
url: https://newhelp.expensify.com
twitter_username: expensify
github_username: expensify

25 changes: 25 additions & 0 deletions help/_layouts/default.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ page.title }}</title>
</head>
<body>
<header>
<nav>
<!-- Navigation links, logo, etc. -->
</nav>
</header>

<!-- This is where the content from product.html or any other layout will be inserted -->
<main>
{{ content }}
</main>

<footer>
<p>&copy; 2024 Your Website</p>
</footer>
</body>
</html>

Loading
Loading