This repo contains the source code of my personal website.
All development should be done on or PR'd to the develop branch. Treat the main and stage branches as readonly.
To work on this project on your local machine, you may follow the instructions below. These instructions
assume you are serving the site using Laravel Valet or Herd out of your ~/Sites directory:
Be sure the following are installed on your machine:
- Composer
- PHP >= 8.3
- PostgreSQL >= 16
- Node >= 18
- Redis for queues/cache
- (Optional) A GitHub OAuth app for your local installation for social login
cd ~/Sites
# Clone your forked version - replace {username} with your username
git clone git@github.com:{username}/randallwilk.dev randallwilk.dev
cd randallwilk.dev
# Run the bash setup script
./bin/setup.shNote: Be sure to fill out GitHub credentials in the
.envto import docs (optional).
Note: The
repositoriesdatabase table is only populated by running thephp artisan import:github-repositoriescommand, and the repositories pulled in are based on your GitHub credentials in the.envfile.
Docs can be imported from the artisan command, as long as you have Laravel Horizon running and the credentials for the GitHub api filled in. It also requires you to have read access to each of the repositories that have docs (I don't think that should be an issue since they're all public).
php artisan import:docsThis GitHub article provides instructions on how to pull the latest changes from this repository into your fork.
If you pull down the upstream changes from this repository into your local repository, you'll want to update your
Composer and NPM dependencies. For convenience, you may run the bin/update-deps.sh script to update these things:
./bin/update-deps.sh| Command | Description |
|---|---|
npm run dev |
Watch for changes in CSS and JS files |
php artisan test |
Run tests |
php artisan import:docs |
Import doc files |
php artisan import:github-repositories |
Sync public repo info with GitHub |
php artisan import:packagist-downloads |
Sync download stats for composer packages |
php artisan sitemap:generate |
Regenerate sitemaps |
php artisan app:refresh-staging-data |
Sync staging database with production; only available to run in production environment |
php artisan app:redact-sensitive-data |
Redact sensitive information from certain tables; not allowed to run in production environment |
Deployments for the main and stage branch are handled through GitHub actions that will handle generating a fresh copy of the .env file with secrets from my 1Password vault. The action will send the fresh copy to the server and trigger a deployment through Forge.
A deployment to the production and staging environments can only be triggered manually by dispatching the GitHub workflow, which requires the correct access permissions to the repository.
For the GitHub actions workflow deploy.yml to work correctly, the following repository secrets are defined for the production and staging environments.
| Secret | Description |
|---|---|
FORGE_TRIGGER_URL |
The deployment trigger URL for the site in Laravel Forge |
KNOWN_HOSTS |
The server ip and public keys. Can find this info in known_hosts file after connecting the server via ssh. |
OP_SERVICE_ACCOUNT_TOKEN |
1Password service account token to connect the environment's vault and 1Password secrets |
REMOTE_HOST |
The server ip address |
REMOTE_TARGET |
The full path to the production site on the server, e.g /home/user_name/randallwilk.dev |
REMOTE_USER |
The linux user that owns the site on the server, e.g forge. |
SSH_KEY |
The private ssh key for the linux user that owns the site. Be sure to add the public key to the server in Forge. Note: do not add a passphrase to the private key. |
This website was principally designed and developed by Randall Wilk.
- The web application falls under the MIT License
- The content and design are under exclusive copyright
If you'd like to reuse or repost something, feel free to reach out at randall@randallwilk.dev. Please remember that the design is not meant to be forked!