-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
hubert.ostrowski
committed
Jul 15, 2024
0 parents
commit c589d73
Showing
133 changed files
with
32,400 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
name: Deploy to WP Engine | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set Up Environment Variables | ||
run: | | ||
echo "AUTH_URL=${{ secrets.AUTH_URL }}" >> $GITHUB_ENV | ||
echo "SYNC_URL=${{ secrets.SYNC_URL }}" >> $GITHUB_ENV | ||
echo "CLIENT_ID=${{ secrets.CLIENT_ID }}" >> $GITHUB_ENV | ||
echo "CLIENT_SECRET=${{ secrets.CLIENT_SECRET }}" >> $GITHUB_ENV | ||
echo "USERNAME=${{ secrets.USERNAME }}" >> $GITHUB_ENV | ||
echo "PASSWORD=${{ secrets.PASSWORD }}" >> $GITHUB_ENV | ||
echo "SECURITY_TOKEN=${{ secrets.SECURITY_TOKEN }}" >> $GITHUB_ENV | ||
- name: GitHub Action Deploy to WP Engine | ||
uses: wpengine/github-action-wpe-site-deploy@v3 | ||
with: | ||
WPE_SSHG_KEY_PRIVATE: ${{ secrets.WPE_SSHG_KEY_PRIVATE }} | ||
WPE_ENV: aiintersectstg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,145 @@ | ||
*~ | ||
.DS_Store | ||
.svn | ||
.cvs | ||
*.bak | ||
*.swp | ||
.idea | ||
Thumbs.db | ||
|
||
# wordpress specific | ||
wp-config.php | ||
wp-content/uploads/ | ||
wp-content/blogs.dir/ | ||
wp-content/upgrade | ||
wp-content/backup-db | ||
wp-content/advanced-cache.php | ||
wp-content/wp-cache-config.php | ||
wp-content/cache | ||
wp-content/cache/supercache | ||
wp-content/plugins/oauth-twitter-for-developers/.tweetcache | ||
wp-content/plugins/oauth-twitter-feed-for-developers/.tweetcache | ||
wp-content/ai1wm-backups | ||
wp-content/plugins/all-in-one-wp-migration/storage | ||
wp-content/plugins/hello.php | ||
wp-content/backup-db | ||
wp-content/updraft | ||
wp-content/upgrade | ||
wp-content/wflogs | ||
wp-content/wphb-cache | ||
wp-content/wphb-logs | ||
wp-content/cimy-user-manager | ||
wp-content/themes/socialdriver/.sass-cache | ||
wp-content/themes/socialdriver/node_modules | ||
wp-content/themes/nmsdc-child/.sass-cache | ||
wp-content/themes/nmsdc-child/node_modules | ||
wp-content/themes/nmsdc-child/css/*.css.map | ||
wp-content/wp-link-status-salt.php | ||
wp-content/languages | ||
wp-content/wp-link-status-salt.php | ||
wp-content/sunrise.php | ||
wp-content/plugins/wp-defender | ||
wp-content/wp-defender-secrets.php | ||
wp-content/plugins/wp-hummingbird | ||
wp-content/plugins/wp-smush-pro | ||
wp-content/smush-webp | ||
/.well-known | ||
/.maintenance | ||
wp-content/smush-webp | ||
/wp-content/debug.log | ||
|
||
# wpengine specific | ||
.smushit-status | ||
.gitattributes | ||
_wpeprivate | ||
wp-content/object-cache.php | ||
wp-content/mu-plugins/ | ||
wp-content/mu-plugins/mu-plugin.php | ||
wp-content/mu-plugins/slt-force-strong-passwords.php | ||
wp-content/mu-plugins/limit-login-attempts | ||
wp-content/mu-plugins/wpengine-common | ||
wp-content/mysql.sql | ||
|
||
# wp core (as of 3.4.1) | ||
/db-config.php | ||
/index.php | ||
/license.txt | ||
/readme.html | ||
/wp-activate.php | ||
/wp-app.php | ||
/wp-atom.php | ||
/wp-blog-header.php | ||
/wp-comments-post.php | ||
/wp-commentsrss2.php | ||
/wp-config-sample.php | ||
/wp-cron.php | ||
/wp-feed.php | ||
/wp-links-opml.php | ||
/wp-load.php | ||
/wp-login.php | ||
/wp-mail.php | ||
/wp-rdf.php | ||
/wp-rss.php | ||
/wp-rss2.php | ||
/wp-pass.php | ||
/wp-register.php | ||
/wp-settings.php | ||
/wp-signup.php | ||
/wp-trackback.php | ||
/xmlrpc.php | ||
/wp-admin | ||
/wp-includes | ||
/wp-content/index.php | ||
/wp-content/themes/twentyten | ||
/wp-content/themes/index.php | ||
/wp-content/plugins/index.php | ||
/apple-touch-icon-precomposed.png | ||
/apple-touch-icon.png | ||
/favicon.ico | ||
/vendor | ||
|
||
# large/disallowed file types | ||
# a CDN should be used for these | ||
*.hqx | ||
*.bin | ||
*.exe | ||
*.dll | ||
*.deb | ||
*.dmg | ||
*.iso | ||
*.img | ||
*.msi | ||
*.msp | ||
*.msm | ||
*.mid | ||
*.midi | ||
*.kar | ||
*.mp3 | ||
*.ogg | ||
*.m4a | ||
*.ra | ||
*.3gpp | ||
*.3gp | ||
*.mp4 | ||
*.mpeg | ||
*.mpg | ||
*.mov | ||
*.webm | ||
*.flv | ||
*.m4v | ||
*.mng | ||
*.asx | ||
*.asf | ||
*.wmv | ||
*.avi | ||
|
||
.htaccess | ||
.yeopress | ||
npm-debug.log | ||
.installedExtras | ||
.well-known | ||
.well-known/MAMP-PRO/installedExtras | ||
MAMP-PRO-Logo.png | ||
.vscode | ||
MAMP-PRO-Logo.png | ||
.well-known/MAMP-PRO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
# aidatabase.mozilla.org | ||
|
||
## Getting started | ||
|
||
Review the README for information about setting up a development environment and compiling scripts/styles. | ||
|
||
- [Setup with Docker](#setting-up-development-environment-with-docker) | ||
- [Install dependencies](#installing-dependencies) | ||
|
||
## Setting up development environment with Docker | ||
|
||
**Requirements**: Docker ([Docker Desktop](https://www.docker.com/products/docker-desktop) for macOS and Windows or [Docker Compose](https://docs.docker.com/compose/install/) for Linux). | ||
|
||
### Setup steps | ||
|
||
- Instantiate a fresh [WordPress installation](https://github.com/docker/awesome-compose/tree/master/wordpress-mysql) | ||
- Clone the repository (`git clone https://github.com/MozillaFoundation/AI-Intersections-Database.git`) into the root | ||
- Run `docker-compose up -d` | ||
|
||
The repository contains the base theme and corresponding sync plugin in their subsequent directories (`wp-content/themes/mozilla-ai-intersections` and `wp-content/plugins/mozilla-salesforce-sync`). Once the environment has been configured, activate the theme and plugin in the WordPress admin and run the Salesforce Sync (found in the main WordPress navigation sidebar). | ||
|
||
## Installing dependencies | ||
|
||
To properly compile styles and scripts, make sure to install the following dependencies... | ||
|
||
- `autoprefixer` | ||
- `concurrently` | ||
- `cross-fetch` | ||
- `cssnano` | ||
- `dotenv` | ||
- `esbuild` | ||
- `node-fetch` | ||
- `postcss` | ||
- `postcss-import` | ||
- `postcss-nested` | ||
- `postcss-nested-ancestors` | ||
- `tailwindcss` | ||
- `terser` | ||
|
||
### Steps to install | ||
|
||
- Navigate to theme directory (`cd wp-content/themes/mozilla-ai-intersections`) | ||
- Initialize npm (`npm init -y`) | ||
- Install dependencies (`npm install autoprefixer@^10.4.14 concurrently@^7.6.0 cross-fetch@^3.1.5 cssnano@^7.0.1 dotenv@^16.0.3 esbuild@^0.17.12 node-fetch@^3.3.1 postcss@^8.4.21 postcss-import@^15.1.0 postcss-nested@^6.0.1 postcss-nested-ancestors@^3.0.0 tailwindcss@^3.4.1 terser@^5.31.0`) | ||
- Run `npm run watch` to listen for codebase updates and recompile scripts/styles | ||
- Repeat for plugin directory (`cd wp-content/plugins/mozilla-salesforce-sync`) | ||
|
||
These commands will add `node_modules` to the theme and plugin directories. Running `npm run watch` enables Tailwind compilation and the proper compilation/minification of all PHP, CSS, and JavaScript files within each directory. The resulting CSS and JavaScript files will live in `dist/css` and `dist/js` respectively. | ||
|
||
### Styling notes | ||
|
||
This build utilizes Tailwind syntax, both in designated stylesheets and inlined classes added directly to elements. Review the [official Tailwind documentation](https://tailwindcss.com/docs/installation) for more information. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
/** | ||
* Define Salesforce sync credentials. | ||
*/ | ||
|
||
define('AUTH_URL', getenv('AUTH_URL')); | ||
define('SYNC_URL', getenv('SYNC_URL')); | ||
define('CLIENT_ID', getenv('CLIENT_ID')); | ||
define('CLIENT_SECRET', getenv('CLIENT_SECRET')); | ||
define('USERNAME', getenv('USERNAME')); | ||
define('PASSWORD', getenv('PASSWORD')); | ||
define('SECURITY_TOKEN', getenv('SECURITY_TOKEN')); |
Oops, something went wrong.