Skip to content

Commit

Permalink
Build on node 18, 20, 21. Deploy on main using node 21 (#60)
Browse files Browse the repository at this point in the history
  • Loading branch information
hmellor authored Mar 6, 2024
1 parent 6c13092 commit 1f342a8
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,16 @@ concurrency:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
version: [18, 20, 21]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: '21'
node-version: ${{ matrix.version }}
cache: 'npm'
- name: Install dependencies
run: |
Expand All @@ -28,13 +31,17 @@ jobs:
- name: Build
run: npm run build
- name: Setup Pages
if: github.ref == 'refs/heads/main' && matrix.version == '21'
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
if: github.ref == 'refs/heads/main' && matrix.version == '21'
uses: actions/upload-pages-artifact@v3
with:
path: './dist'

deploy:
# Only deploy on main branch
if: github.ref == 'refs/heads/main'
needs: build
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
Expand Down

0 comments on commit 1f342a8

Please sign in to comment.