Remove test vibration #41
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: Deploy to GitHub Pages | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
env: | |
# NODE_VERSION: lts/* | |
CACHE-NAME: cache-node-modules | |
jobs: | |
deploy: | |
name: Deploying | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache node modules | |
id: cache-npm | |
uses: actions/cache@v3 | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.CACHE-NAME }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.CACHE-NAME }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | |
name: List the state of node modules | |
continue-on-error: true | |
run: npm list | |
# Disable it because of extra unused work job | |
# The action has a built-in functionality for caching and restoring dependencies. | |
# It uses actions/cache under the hood for caching global packages data but requires less configuration settings. | |
# - uses: actions/setup-node@v3 | |
# with: | |
# node-version: ${{ env.NODE_VERSION }} | |
# cache: "npm" | |
- name: Install Dependencies | |
run: npm ci | |
- name: Run Build | |
run: npm run build | |
- name: Deploying to GH-Pages | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: build | |
publish_branch: gh-pages |