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

Remove generated content from being tracked in Git #1230

Merged
merged 30 commits into from
Aug 25, 2020
Merged
Show file tree
Hide file tree
Changes from 24 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
80b9896
Remove generated content
tunetheweb Aug 19, 2020
7e6f163
Add deploy script
tunetheweb Aug 19, 2020
d3de1f4
Linting fixes
tunetheweb Aug 19, 2020
97735a3
Linting and README fixes
tunetheweb Aug 19, 2020
5bfd8ce
Linting fixes
tunetheweb Aug 19, 2020
36d8b9f
Check branch is clean before deploying
tunetheweb Aug 21, 2020
705fb29
Uncapitalise non-default
tunetheweb Aug 21, 2020
e3e1188
Linting fixes
tunetheweb Aug 21, 2020
8ac3b9d
Merge branch 'main' into remove_generated_content
tunetheweb Aug 21, 2020
3fde1eb
Improved deploy method
tunetheweb Aug 23, 2020
63cacde
Add PDFs back in
tunetheweb Aug 23, 2020
c0c2159
Linting issues
tunetheweb Aug 23, 2020
355efd5
Uncomment commands
tunetheweb Aug 23, 2020
7ff4c8b
Increment patch instead of major by default
tunetheweb Aug 23, 2020
011caa5
Fix typo
tunetheweb Aug 23, 2020
ec2ade7
Merge branch 'main' into remove_generated_content
tunetheweb Aug 23, 2020
2d5af55
Review feedback and other cleanups
tunetheweb Aug 23, 2020
e153b9f
Fix typo
tunetheweb Aug 23, 2020
4e3196f
Update src/tools/scripts/deploy.sh
tunetheweb Aug 23, 2020
6b77943
Update src/tools/scripts/deploy.sh
tunetheweb Aug 23, 2020
385fa04
Update src/tools/scripts/deploy.sh
tunetheweb Aug 23, 2020
6c8f5a1
Review feedback
tunetheweb Aug 23, 2020
0bb6675
Merge branch 'remove_generated_content' of github.com:HTTPArchive/alm…
tunetheweb Aug 23, 2020
45aa163
Merge branch 'main' into remove_generated_content
tunetheweb Aug 24, 2020
ac70e87
Update src/.gcloudignore
tunetheweb Aug 25, 2020
f867075
Merge branch 'main' into remove_generated_content
tunetheweb Aug 25, 2020
1ea4e4d
README updates
tunetheweb Aug 25, 2020
c03bc35
Merge branch 'main' into remove_generated_content
tunetheweb Aug 25, 2020
ccc3b1d
Make deploy.zip smaller
tunetheweb Aug 25, 2020
5792f7c
Cleanup
tunetheweb Aug 25, 2020
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
19 changes: 19 additions & 0 deletions src/.gcloudignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,11 @@
# For more information, run:
# $ gcloud topic gcloudignore
#
# Note we are also using this for zip ignore in deploy.xh, so have to be a little
tunetheweb marked this conversation as resolved.
Show resolved Hide resolved
# bit more verbose than gcloud demands, to exclude items

.gcloudignore

# If you would like to upload your .git directory, .gitignore file or files
# from your .gitignore file, remove the corresponding line
# below:
Expand All @@ -16,8 +20,23 @@
# Python pycache:
__pycache__/
.pytest_cache/
__pycache__/*
.pytest_cache/*
**/__pycache__/*
**/.pytest_cache/*
*.pyc
**/*.pyc

# Ignored by the build system
/setup.cfg

env/
env/*
node_modules/
node_modules/*
static/html
static/html/*
.DS_Store
**/.DS_Store
Dockerfile
.dockerignore
4 changes: 4 additions & 0 deletions src/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
.idea/
.vscode/
node_modules/
templates/*/*/chapters/
tunetheweb marked this conversation as resolved.
Show resolved Hide resolved
templates/*/*/ebook.html
templates/sitemap.xml
static/html/
deploy.zip
32 changes: 15 additions & 17 deletions src/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -152,28 +152,26 @@ _Make sure you have generated the ebooks PDFs first in the main branch, by runni
gcloud init
```

3. Stage the changes locally:

```
git checkout production
git status
git pull
git pull origin main
git push
```

- Check out the `production` branch
- Run `git status` to ensure you don't have any uncommitted changes locally
- Merge any remote changes (both origin/production and origin/main branches)
- Push the merge-commit back up to origin/production

4. Browse the website locally as one final QA test, then deploy the changes live:
3. Deploy the site:
tunetheweb marked this conversation as resolved.
Show resolved Hide resolved

```
npm run deploy
```

5. Browse the website in production to verify that the new changes have taken effect
The deploy script will do the following:
- Switch to the production branch
- Merge changes from main
- Do a clean install
- Run the tests
- Ask you to complete any local tests and confirm good to deploy
- Ask for a version number (suggesing the last verision tagged and incrementing the patch)
- Tag the release (after asking you for the verion number to use)
- Generate a `deploy.zip` file of what has been deployed
- Deploy to GCP
- Push changes to `production` branch on GitHub
- Ask you to update the release section of GitHub

4. Browse the website in production to verify that the new changes have taken effect. Not we have 3 hour caching so add random query params to pages to ensure you get latest version.

## Developing in Docker

Expand Down
2 changes: 1 addition & 1 deletion src/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"test": "node ./tools/test",
"generate": "node ./tools/generate",
"ebooks": "node ./tools/generate/generate_ebook_pdfs",
"deploy": "echo \"Y\" | gcloud app deploy --project webalmanac --stop-previous-version"
"deploy": "./tools/scripts/deploy.sh"
},
"devDependencies": {
"ejs": "^3.1.5",
Expand Down
381 changes: 0 additions & 381 deletions src/templates/en/2019/chapters/accessibility.html

This file was deleted.

684 changes: 0 additions & 684 deletions src/templates/en/2019/chapters/caching.html

This file was deleted.

1,587 changes: 0 additions & 1,587 deletions src/templates/en/2019/chapters/cdn.html

This file was deleted.

691 changes: 0 additions & 691 deletions src/templates/en/2019/chapters/cms.html

This file was deleted.

330 changes: 0 additions & 330 deletions src/templates/en/2019/chapters/compression.html

This file was deleted.

809 changes: 0 additions & 809 deletions src/templates/en/2019/chapters/css.html

This file was deleted.

635 changes: 0 additions & 635 deletions src/templates/en/2019/chapters/ecommerce.html

This file was deleted.

677 changes: 0 additions & 677 deletions src/templates/en/2019/chapters/fonts.html

This file was deleted.

692 changes: 0 additions & 692 deletions src/templates/en/2019/chapters/http2.html

This file was deleted.

426 changes: 0 additions & 426 deletions src/templates/en/2019/chapters/javascript.html

This file was deleted.

354 changes: 0 additions & 354 deletions src/templates/en/2019/chapters/markup.html

This file was deleted.

515 changes: 0 additions & 515 deletions src/templates/en/2019/chapters/media.html

This file was deleted.

334 changes: 0 additions & 334 deletions src/templates/en/2019/chapters/mobile-web.html

This file was deleted.

905 changes: 0 additions & 905 deletions src/templates/en/2019/chapters/page-weight.html

This file was deleted.

294 changes: 0 additions & 294 deletions src/templates/en/2019/chapters/performance.html

This file was deleted.

232 changes: 0 additions & 232 deletions src/templates/en/2019/chapters/pwa.html

This file was deleted.

272 changes: 0 additions & 272 deletions src/templates/en/2019/chapters/resource-hints.html

This file was deleted.

Loading