Skip to content

Commit

Permalink
Upgrade Node.js, dependent packages, and GitHub Actions (#100)
Browse files Browse the repository at this point in the history
* Upgrade Node.js, dependent packages, and GitHub Actions

* Update the command for installing chrome to prevent using the cached version of `@puppeteer/browsers`

* Update chrome installation command for netlify

* Use the compatible chromium in Vercel build

* Fix vercel build: Install nss before building

* Fix Vercel build: Install mesa-libgbm before build
  • Loading branch information
yhatt authored Feb 23, 2024
1 parent da954e1 commit 7b3e5df
Show file tree
Hide file tree
Showing 6 changed files with 460 additions and 2,125 deletions.
13 changes: 5 additions & 8 deletions .github/workflows/github-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install Node.js
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
cache: npm
node-version-file: '.nvmrc'
Expand All @@ -35,19 +35,16 @@ jobs:
run: npm ci

- name: Build Marp slide deck
run: CHROME_PATH=$(npx @puppeteer/browsers install chrome@stable --path $(realpath ./tmp) | awk '{print $2}') npm run build
run: CHROME_PATH=$(npx -y @puppeteer/browsers@latest install chrome@stable --path $(realpath ./tmp) | awk '{print $2}') npm run build
env:
# Please update URL if you want to use custom domain
URL: https://${{ github.event.repository.owner.name }}.github.io/${{ github.event.repository.name }}

# Recommend to set lang for your deck to get better rendering for Open Graph image
LANG: en-US

- name: Upload page artifacts
uses: actions/upload-pages-artifact@v1
uses: actions/upload-pages-artifact@v3
with:
path: public

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@main
uses: actions/deploy-pages@v4
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18.16.1
20.11.1
1 change: 1 addition & 0 deletions PITCHME.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
---
marp: true
lang: en-US
title: Marp CLI example
description: Hosting Marp slide deck on the web
theme: uncover
Expand Down
2 changes: 1 addition & 1 deletion netlify.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
[build]
publish = "public"
command = "CHROME_PATH=$(npx @puppeteer/browsers install chrome@stable --path $(realpath ./tmp) | awk '{print $2}') npm run build"
command = "CHROME_PATH=$(npx -y @puppeteer/browsers@latest install chrome@stable --path $(realpath ./tmp) | awk '{print $2}') npm run build"
Loading

0 comments on commit 7b3e5df

Please sign in to comment.