fix: update packages to fix dependabot security warning #144
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish-demo-to-github-pages | |
on: | |
push: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
publish: | |
runs-on: ubuntu-22.04 | |
strategy: | |
matrix: | |
node-version: [20.x] | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
- name: Use Node ${{ matrix.node-version }} | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: npm ci and npm run build | |
run: | | |
npm ci | |
npm run build:ghpages | |
- name: Publish current workdir (which contains generated content) to GitHub Pages | |
uses: rayluo/[email protected] | |
with: | |
# Optional. Default value "." means the root directory of your project will be published. | |
# You can use whatever directory your project uses, for example "wwwroot". | |
# Such a directory does *not* have to already exist in your repo, | |
# it could be an output directory created dynamically by your static website builder. | |
source-directory: ghpages | |
# Optional. Default value "gh_pages". | |
# It specifies the temporary branch which hosts the static website. | |
# Each build will OVERWRITE this branch. | |
target-branch: gh_pages |