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

update #22

Open
wants to merge 59 commits into
base: production
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
3c1f259
Update global_indicators.yml
angelamhkim Nov 30, 2021
f70823b
Update global_indicators.yml
angelamhkim Nov 30, 2021
e265c53
Update global_indicators.yml
angelamhkim Nov 30, 2021
911ef41
Update global_indicators.yml
angelamhkim Nov 30, 2021
f7669aa
Update global_indicators.yml
angelamhkim Nov 30, 2021
0927948
Update global_indicators.yml
angelamhkim Nov 30, 2021
2ae9937
Update global_indicators.yml
angelamhkim Nov 30, 2021
904879b
Update global_indicators.yml
angelamhkim Nov 30, 2021
f9cf757
Update global_indicators.yml
angelamhkim Nov 30, 2021
4300a42
Update global_indicators.yml
angelamhkim Nov 30, 2021
e676861
Update frontpage.html
angelamhkim Dec 1, 2021
0543e3c
Update frontpage.html
angelamhkim Dec 1, 2021
28cf691
Update global_targets.yml
angelamhkim Dec 2, 2021
aef6bca
Update global_targets.yml
angelamhkim Dec 2, 2021
b81cf99
Update global_indicators.yml
angelamhkim Dec 9, 2021
58d26b8
Update publications.md
angelamhkim Dec 13, 2021
3e891ef
Update publications.md
angelamhkim Dec 13, 2021
ccf4ab4
Update publications.md
angelamhkim Dec 13, 2021
2152942
Update publications.md
angelamhkim Dec 13, 2021
bae8f45
Update publications.md
angelamhkim Dec 13, 2021
27843da
add environements and resolve deprecations
RV-LACity May 16, 2023
a9fb81c
Merge pull request #24 from CityOfLosAngeles/ghi-23
RV-LACity May 16, 2023
33ae8b2
update appropriate files to be in alignment with
jaylenw Mar 9, 2024
b312313
update the .gitignore file to ignore the
jaylenw Mar 9, 2024
98d0270
modify layouts and config to support build process
jaylenw Mar 11, 2024
916e173
add test dir to gitignore and make the test
jaylenw Mar 11, 2024
c162cb1
modify the workflows to test and deploy
jaylenw Mar 12, 2024
866913b
update workflow to resolve job name conflict
jaylenw Mar 12, 2024
39d90c2
add github issue and pr templates
jaylenw Mar 12, 2024
4eb4fcf
add instructions for running html validation
jaylenw Mar 12, 2024
3430c22
add documentation that explains installing the
jaylenw Mar 12, 2024
5b188d9
modify command for running html validation scripts
jaylenw Mar 12, 2024
e6a99d6
add github actions documentation
jaylenw Mar 12, 2024
f716cfe
Merge pull request #26 from CityOfLosAngeles/ghi-25
jaylenw Jun 6, 2024
39baa55
Bump nokogiri from 1.16.2 to 1.16.5
dependabot[bot] Jun 6, 2024
c34734d
Bump rexml from 3.2.6 to 3.3.3
dependabot[bot] Aug 2, 2024
5c09cb6
update dev workflow file for deployment, correct the _config.yml file…
jaylenw Aug 20, 2024
8caa2d4
set remote data prefix to the new development url for _config.yml
jaylenw Aug 20, 2024
5996bfb
make sure all occurences of http are https and replace
jaylenw Aug 20, 2024
08f957f
replace lamayor.org with mayor.lacity.gov
jaylenw Aug 20, 2024
267628f
remove dynamic linking of goals on the homepage
jaylenw Aug 21, 2024
6f3ea5e
Merge pull request #27 from CityOfLosAngeles/dependabot/bundler/nokog…
jaylenw Aug 21, 2024
b5706a9
Merge pull request #29 from CityOfLosAngeles/dependabot/bundler/rexml…
jaylenw Aug 21, 2024
d19de42
Merge pull request #31 from CityOfLosAngeles/ghi-30
jaylenw Aug 21, 2024
126eba3
Update BuildNDeployDev.yml
jaylenw Aug 21, 2024
728934f
Bump rexml from 3.3.3 to 3.3.6
dependabot[bot] Aug 22, 2024
8afa2e8
upgrade the open-sdg theme to resolve security issue
jaylenw Sep 19, 2024
72b52c3
Merge remote-tracking branch 'origin/dependabot/bundler/rexml-3.3.6' …
jaylenw Sep 19, 2024
8d923cf
Merge pull request #34 from CityOfLosAngeles/ghi-33
jaylenw Sep 19, 2024
b73b6dc
update bundle install command on the readme to resolve deprecation wa…
jaylenw Sep 19, 2024
d0b7899
resolve Unsafe expansion of self-closing HTML tag on disconnectedyout…
jaylenw Sep 19, 2024
10cb4d0
upgrade applicable dependencies that exist in open-sdg parent project…
jaylenw Sep 19, 2024
f4ca381
update remote data url for production and update download-all-metadat…
jaylenw Sep 19, 2024
7ab1dc2
Fix code scanning alert #5: DOM text reinterpreted as HTML
jaylenw Sep 19, 2024
7c31890
fix leaflet integrity
jaylenw Sep 19, 2024
0d2c6df
update jquery and address the unsafe expansion of self-closing html tag
jaylenw Sep 19, 2024
12a63c3
Merge pull request #36 from CityOfLosAngeles/autofix/alert-5-3f551db6e0
jaylenw Sep 19, 2024
1ff20a7
update github action status badges
jaylenw Sep 19, 2024
cbecc55
Merge pull request #37 from CityOfLosAngeles/ghi-35
jaylenw Sep 19, 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
37 changes: 37 additions & 0 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/ruby
{
"name": "Ruby",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/ruby:1-3.2-bullseye",
"features": {
"ghcr.io/devcontainers/features/python:1": {
"installTools": true,
"version": "3.11"
}
},

// Features to add to the dev container. More info: https://containers.dev/features.
// "features": {},

// Use 'forwardPorts' to make a list of ports inside the container available locally.
// not used as we are using --network=host, see below
// "forwardPorts": [
// // Jekyll Server
// 4000,
// // Live Reload Server
// 35729
// ],

// Use 'postCreateCommand' to run commands after the container is created.
"postCreateCommand": "bundle install --path=vendor/bundle",

// allow the container to talk to ports on the host
"runArgs": [ "--network=host" ]

// Configure tool-specific properties.
// "customizations": {},

// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
// "remoteUser": "root"
}
40 changes: 40 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
name: Bug Report
about: Report a Bug
title: ''
labels: bug
assignees: ''

---

<!---
Please read this!

Before opening a new issue, make sure to search for keywords in the issues
filtered by the "bug" and verify the issue you're about to submit isn't a duplicate.
--->

### Summary

<!-- Summarize the bug encountered concisely. -->

### Steps to reproduce

<!-- Describe how one can reproduce the issue - this is very important. Please use an ordered list. -->

### What is the current *bug* behavior?

<!-- Describe what actually happens. -->

### What is the expected *correct* behavior?

<!-- Describe what you should see instead. -->

### Relevant logs and/or screenshots

<!-- Paste any relevant logs - please use code blocks (```) to format console output, logs, and code
as it's tough to read otherwise. -->

### Possible fixes

<!-- If you can, link to the line of code that might be responsible for the problem. -->
27 changes: 27 additions & 0 deletions .github/ISSUE_TEMPLATE/general_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
name: General Issue
about: Suggest an idea for this project
title: ''
labels: ''
assignees: ''

---

<!---
Please read this!

Before opening a new issue, make sure to search for relevant keywords in the issues
and verify the issue you're about to submit isn't a duplicate.
--->

### Problem

<!-- Describe the general issue -->

### Background Info

<!-- If you can, provide how may we resolve the particular problem? -->

### Proposed Solution

<!-- If you can, provide how may we resolve the particular problem? -->
25 changes: 25 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
### What does this PR do?

<!-- Provide information of what the changes in this PR do. This may include both code changes and
application behavior -->

### Background info

<!-- Provide relevant information for this PR, such as why it was opened, reasons for the changes, what
needs to noted moving forward, etc. -->

### How can this be tested (manually and/or automated test)?

<!-- Provide steps to manually test the changes if applicable -->
#### Provide manual tests steps if applicable

<!-- Provide steps to run our test tools to test the changes if applicable -->
#### Provide steps for running automated tests if applicable

### Which issue(s) is/are related to this PR?

<!-- List the issues with #<issue-number> -->
This PR is/are related to issue(s)

<!-- List close #<issue-number> for the issues that can be closed by this PR -->
close
114 changes: 55 additions & 59 deletions .github/workflows/BuildNDeployDev.yml
Original file line number Diff line number Diff line change
@@ -1,81 +1,77 @@
# This workflow will checkout the contents of the `development` branch of this repo, remove all files in the current S3 bucket, and push the contents
# to the bucket. Once the contents of the S3 bucket has been updated, a call will be made to invalidate the cache in the CloudFront distribution.
# The CloudFront distribution is configured to pull the contents from the S3 bucket once an `invalidation` request is sent.
# This workflow can be invoked by all branches except production where only the development branch can trigger the "deploy" job.

name: Build and Deploy Development Static Site
name: Build and Deploy Development Static Site Dev # run this workflow when a push has been made. if a push has been made to the development branch it will deploy the site to the hosting environment

on: # run this workflow when a push has been made to `development` branch
push:
branches:
- development
repository_dispatch: # Listen for repository dispatch event from open-sdg-data-starter workflow
types: [dev_triggered_from_open-sdg-data-starter]
branches-ignore:
- production
workflow_dispatch:
#repository_dispatch: # Listen for repository dispatch event from open-sdg-data-starter workflow, TBD
# types: [dev_triggered_from_open-sdg-data-starter], TBD

jobs:
deploy:
runs-on: ubuntu-20.04
steps:
###########################################################################################################
# This is the CI portion
###########################################################################################################
build:
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
ref: development
uses: actions/checkout@v4 # checks out the code in the repository

- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: '2.6' # Version range or exact version of a Ruby version to use, using semvers version range syntax.


- name: Cache and Install Gem files
uses: actions/cache@v2
uses: ruby/setup-ruby@v1 # sets up ruby in our environment and install Ruby dependencies
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
ruby-version: '3.2' # install ruby version 3.2
bundler-cache: true # https://github.com/ruby/setup-ruby?tab=readme-ov-file#caching-bundle-install-automatically, it will perform caching and does run `bundle config --local path $PWD/vendor/bundle` & `bundle install`. It will handle the Gemfile.lock file appropriately.

- name: Install Ruby dependencies
run: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle

- name: Install Jekyll and Build
run: bundle exec jekyll build --config _config.yml

- name: Test the HTML # test our rendered html files
run: bash scripts/test/html_proofer.sh

###########################################################################################################
# This is the CD portion
###########################################################################################################

#- uses: actions/checkout@v1 # checks out the code in the repository
- name: Setup Python
uses: actions/setup-python@v1 # sets up python in our environment
with:
python-version: '3.x' # install python version 3.x, default architecture is x64

- name: Build the development site
run: bundle exec jekyll build --config _config.yml # build the site using the development configuration file

- name: Perform HTML validation # test our rendered html files
run: bash scripts/test/html_proofer_staging.sh

- name: Zip site artifact # only zip the site if the push was made to the development branch
if: ${{ github.ref == 'refs/heads/development' }}
run: zip -r _site.zip _site

- name: Upload site artifact # only upload the zip if the push was made to the development branch
if: ${{ github.ref == 'refs/heads/development' }}
uses: actions/upload-artifact@v4
with:
name: site-deployment-dev
path: _site.zip
retention-days: 1 # delete the artifact after 1 day

deploy:
runs-on: ubuntu-22.04
needs: [build]
if: (github.ref == 'refs/heads/development')
environment:
name: development
url: https://${{ vars.SITE_DOMAIN_NAME }}
permissions: # required for configure-aws-credentials action to work properly
id-token: write
contents: read
steps:
- name: Install AWS CLI
run: pip3 install awscli --upgrade --user # install the cli with upgrade to any requirements and into the subdir of the user



- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1 # use the official GitHub Action from AWS to setup credentials
uses: aws-actions/configure-aws-credentials@v4 # use the official GitHub Action from AWS to setup credentials
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
role-to-assume: ${{ secrets.ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}
mask-aws-account-id: true

- name: Fetch site artifact
uses: actions/download-artifact@v4
with:
name: site-deployment-dev

- name: Unzip site artifact
run: unzip _site.zip


- name: Push Contents to S3 # push the current working directory to the S3 bucket
run: aws s3 sync _site/ s3://${{ secrets.S3_BUCKET_NAME_DEV }} --exclude ".git/*" --exclude ".github/*" --delete # have the bucket have the same content in the repo & exclude the git related directories.
run: aws s3 sync _site/ s3://${{ secrets.S3_BUCKET_NAME }} --exclude ".git/*" --exclude ".github/*" --delete # have the bucket have the same content in the repo & exclude the git related directories.


- name: Invalidate CloudFront Cache # Invalidate the CloudFront Distribution Cache to get contents from the S3 bucket
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CDN_DISTRIBUTION_ID_DEV }} --paths "/*"



run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CDN_DISTRIBUTION_ID }} --paths "/*"
48 changes: 13 additions & 35 deletions .github/workflows/BuildNDeployProd.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# This workflow will checkout the contents of the `production` branch of this repo, remove all files in the current S3 bucket, and push the contents
# to the bucket. Once the contents of the S3 bucket has been updated, a call will be made to invalidate the cache in the CloudFront distribution.
# The CloudFront distribution is configured to pull the contents from the S3 bucket once an `invalidation` request is sent.

name: Build and Deploy Production Static Site
name: Build and Deploy Production Static Site Prod # run this workflow when a push has been made to production branch

on: # run this workflow when a push has been made to `Jekyll-Alf` branch
push:
Expand All @@ -11,31 +8,25 @@ on: # run this workflow when a push has been made to `Jekyll-Alf` branch
repository_dispatch: # Listen for repository dispatch event from open-sdg-data-starter workflow
types: [prod_triggered_from_open-sdg-data-starter]


jobs:
deploy:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
environment:
name: production
url: https://${{ vars.SITE_DOMAIN_NAME }}
steps:
###########################################################################################################
# This is the CI portion
###########################################################################################################
- name: Checkout repo
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
ref: production

- name: Setup Ruby
uses: actions/setup-ruby@v1
with:
ruby-version: '2.6' # Version range or exact version of a Ruby version to use, using semvers version range syntax.

- name: Cache and Install Gem files
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: |
${{ runner.os }}-gems-
ruby-version: '3.2' # Version range or exact version of a Ruby version to use, using semvers version range syntax.

- name: Install Ruby dependencies
run: bundle check --path=vendor/bundle || bundle install --path=vendor/bundle
Expand All @@ -44,37 +35,24 @@ jobs:
run: bundle exec jekyll build --config _config.yml,_config_prod.yml

- name: Test the HTML # test our rendered html files
run: bash scripts/test/html_proofer.sh
run: bash scripts/test/html_proofer_prod.sh

###########################################################################################################
# This is the CD portion
###########################################################################################################

#- uses: actions/checkout@v1 # checks out the code in the repository
- name: Setup Python
uses: actions/setup-python@v1 # sets up python in our environment
with:
python-version: '3.x' # install python version 3.x, default architecture is x64



- name: Install AWS CLI
run: pip3 install awscli --upgrade --user # install the cli with upgrade to any requirements and into the subdir of the user


- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1 # use the official GitHub Action from AWS to setup credentials
uses: aws-actions/configure-aws-credentials@v4 # use the official GitHub Action from AWS to setup credentials
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_PROD }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_PROD }}
role-to-assume: ${{ secrets.ROLE_ARN }}
aws-region: ${{ secrets.AWS_REGION }}
mask-aws-account-id: true


- name: Push Contents to S3 # push the current working directory to the S3 bucket
run: aws s3 sync _site/ s3://${{ secrets.S3_BUCKET_NAME_PROD }} --exclude ".git/*" --exclude ".github/*" --delete # have the bucket have the same content in the repo & exclude the git related directories.
run: aws s3 sync _site/ s3://${{ secrets.S3_BUCKET_NAME }} --exclude ".git/*" --exclude ".github/*" --delete # have the bucket have the same content in the repo & exclude the git related directories.

- name: Invalidate CloudFront Cache # Invalidate the CloudFront Distribution Cache to get contents from the S3 bucket
run: aws cloudfront create-invalidation --distribution-id ${{ secrets.CDN_DISTRIBUTION_ID_PROD }} --paths "/*"



run: aws cloudfront create-invalidation --distribution-id "$CDN_DISTRIBUTION_ID" --paths "/*"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ _site/
.spyproject/
*__pycache__/
*.Rproj
Gemfile.lock
deploy_key*
deploy_key*.pub
*.keybase
vendor/
_test/
9 changes: 6 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
source "https://rubygems.org"

gem "jekyll", "3.8.4"
gem "html-proofer"
gem "jekyll", "3.9.3"
gem "html-proofer", "3.19.4"
gem "jekyll-remote-theme"
gem "jekyll-open-sdg-plugins", "~> 0.0.15"
gem "deep_merge"
gem "jekyll-open-sdg-plugins", "2.3.0"
gem "kramdown-parser-gfm"
gem "webrick"
Loading
Loading