From b7b7a55208802247af1d58eda0b13b2b94699d1e Mon Sep 17 00:00:00 2001 From: pisshammy <165633434+hammyo-o@users.noreply.github.com> Date: Sun, 17 Nov 2024 18:37:27 -0600 Subject: [PATCH] Create jekyll-gh-pages.yml --- .github/workflows/jekyll-gh-pages.yml | 44 +++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 .github/workflows/jekyll-gh-pages.yml diff --git a/.github/workflows/jekyll-gh-pages.yml b/.github/workflows/jekyll-gh-pages.yml new file mode 100644 index 0000000..3575613 --- /dev/null +++ b/.github/workflows/jekyll-gh-pages.yml @@ -0,0 +1,44 @@ +name: Bundle and Publish Sources +on: + push: + branches: + - '**' + - '!main' +jobs: + build: + name: Bundle and Publish Sources + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [20.x] + + steps: + - name: Checkout Branch + uses: actions/checkout@v4.1.2 + + - name: Setup Node.js environment + uses: actions/setup-node@v4.0.2 + with: + node-version: ${{ matrix.node-version }} + + - name: Extract branch name + shell: bash + run: echo "branch=$(echo ${GITHUB_REF#refs/heads/})" >> $GITHUB_OUTPUT + id: extract_branch + + - name: Checkout existing bundles + uses: actions/checkout@v4.1.2 + continue-on-error: true + with: + ref: gh-pages + path: bundles + + - run: npm install + - run: npm run bundle -- --folder=${{ steps.extract_branch.outputs.branch }} + + - name: Deploy to GitHub Pages + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + branch: gh-pages + folder: bundles