From db09ba0a42fb1c45e856727c758ff3916f787af5 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Tue, 21 Jan 2025 12:17:16 -0700 Subject: [PATCH 1/3] add a github workflow to auto-deploy --- .github/workflows/deploy.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..a2fa46a --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,34 @@ +name: Deploy +on: + push: + branches: + - main +permissions: + contents: write +jobs: + deploy: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: '16' + - name: Install Dependencies + run: npm install + - name: Build + run: npm run build + - name: Configure Git + run: | + git config --global user.email "github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + - name: Deploy to GitHub Pages + env: + CI: true + GIT_USER: github-actions[bot] # Add user for gh-pages package + GITHUB_TOKEN: ${{ github.token }} # Authenticate with the token + run: npx gh-pages -d build --repo https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git + + \ No newline at end of file From 0413f10a957484944966e6a3fa1d739158a11007 Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Tue, 21 Jan 2025 12:52:50 -0700 Subject: [PATCH 2/3] bump version --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c3cf9d0..e6623f5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sapling-chain", - "version": "1.1.1", + "version": "1.2.0", "description": "Create a tree of hyperlinks that can be used in social media profiles. 🔗🌲😂", "author": "Chris Reynolds ", "license": "GPL-3.0-or-later", From 3e25f2b8b4a6b1922f42e932659b0fb24e30550b Mon Sep 17 00:00:00 2001 From: Chris Reynolds Date: Tue, 21 Jan 2025 13:13:02 -0700 Subject: [PATCH 3/3] update readme --- README.md | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 14d1519..f475a11 100644 --- a/README.md +++ b/README.md @@ -16,10 +16,16 @@ It's all relatively uncomplicated. All you need to do is fork this repository in You can have as many links as you want and each one can be accompanied by an icon (provided by [FontAwesome](https://fontawesome.com/)). There are two built-in themes based on Ethan Schoonover's popular [Solarized](https://ethanschoonover.com/solarized/) color schemes, but folks who are fancy with CSS can build their own color schemes or themes. (And please do! [Contributions are welcome!](https://github.com/jazzsequence/jazzsequence.github.io/pulls)) +## Automated Deployment + +See below if you want to use manual deployments and want to opt out of automatic GitHub Pages deployments. + +By default, since 1.2.0, your projects will auto-deploy to GitHub pages whenever you push or merge a commit to the `main` branch. No configuration is required. The GitHub Actions bot uses its own token and runs the build and deploy workflows autonomously so you don't have to. 🎉 + ### Requirements * [NodeJS](https://nodejs.org/en) (this project is foundationally based on Node 16. Other versions may not work. You might want to use [nvm](https://github.com/nvm-sh/nvm) to manage multiple Node versions) * Some kind of command-line tool. I like [Warp](https://www.warp.dev/) (for MacOS). -* [FontAwesome v5](https://fontawesome.com/v5/search) - While this isn't a _requirement_ in the sense that you need to install anything, the v5 / v6 syntax is different, so you'll want to make sure you're looking at _v5_ documentation when referencing icon names. +* [FontAwesome v6](https://fontawesome.com/v6/search) - While this isn't a _requirement_ in the sense that you need to install anything, the v5 / v6 syntax is different, so you'll want to make sure you're looking at _v5_ documentation when referencing icon names. The FontAwesome script has been updated to use v6 icons and the syntax is backwards-compatible, meaning `fa-brands` (referenced in v6 documentation/examples) still supports the `fab` prefix. ### Getting started The repository comes with a `details-example.js` file to get you started. Copy this into a `details.js` file where you will make your changes. You will probably want to commit this file to your repository, otherwise this file will only exist on your local machine and will not exist if you ever move machines, delete the local copy, etc. @@ -54,7 +60,10 @@ Color schemes are attached to a class that is added to the main `div` that wraps You can build and test your profile locally by running an `npm install` and then using the `npm run dev` script. That will open a new browser window that live-updates when you make changes to the source code. Use `Command + X`/`Control + X` to stop the script from running when you're done developing. ### Deploying your new profile! -First things first, you'll need to run `npm install` to install the various Node dependencies. Some of these are for local development which, if you don't plan on making changes to the code, you won't be using, but you might if you do decide to make any custom tweaks. + +First things first, if you want to manually deploy, you need to remove the `deploy.yml` in `.github/workflows`. The GitHub workflow is designed to be hands-off and just deploys on pushes to `main`. + +Assuming you've done that, you'll need to run `npm install` to install the various Node dependencies. Some of these are for local development which, if you don't plan on making changes to the code, you won't be using, but you might if you do decide to make any custom tweaks. Before you deploy, you'll need to add a line to the `package.json` file. This is simply going to tell GitHub that it should look at your compiled app rather than your readme (which is what it does by default). Find the `"homepage"` line in the `package.json` and in the empty string (`""`), enter in the full URL to where your profile page will live (`https://{yourusername}.github.io`, for example, the full line in my compiled `package.json` file would be: `"homepage": "https://jazzsequence.github.io"`).