Skip to content

Commit

Permalink
Update node.js.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
DanTheMan827 authored Jan 29, 2025
1 parent c0e6839 commit 38ea80d
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,28 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Node.js Build and deploy
name: Build and deploy

on:
push:
branches: ["master"]
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true

jobs:
get-branches:
runs-on: ubuntu-latest
permissions:
contents: read

outputs:
branches: ${{ steps.get-branches.outputs.branches }}

runs-on: ubuntu-latest

steps:
- name: Get list of remote branches and their hashes
id: get-branches
Expand All @@ -34,17 +33,21 @@ jobs:
echo "$branches" | jq .
echo "branches=$branches" >> $GITHUB_OUTPUT
build:
runs-on: ubuntu-latest
needs: get-branches
continue-on-error: true
build:
permissions:
contents: read

outputs:
branches: ${{ needs.get-branches.outputs.branches }}

strategy:
matrix:
branches: ${{fromJson(needs.get-branches.outputs.branches)}}

runs-on: ubuntu-latest
needs: get-branches
continue-on-error: true

steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -80,6 +83,11 @@ jobs:

# Deployment job
deploy:
permissions:
contents: read
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
Expand Down

0 comments on commit 38ea80d

Please sign in to comment.