Skip to content

chore: Update actions on GitHub workflows #26

chore: Update actions on GitHub workflows

chore: Update actions on GitHub workflows #26

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Setup node
uses: actions/setup-node@v6
with:
node-version-file: '.nvmrc'
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- name: Cache node modules
uses: actions/cache@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm i
- name: Build
run: npm run build
- name: Deploy with gh-pages
run: |
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git
npx gh-pages -d public -b gh-pages -u "github-actions-bot <[email protected]>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}