Add zzz Command-line tool to put Macs to sleep #65
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
# github pages: https://github.com/marketplace/actions/github-pages-action#table-of-contents | |
# How to cache node_modules in GitHub Actions with Yarn: https://dev.to/mpocock1/how-to-cache-nodemodules-in-github-actions-with-yarn-24eh | |
name: GitHub Pages | |
on: | |
push: | |
branches: | |
- master | |
# trigger deployment manually | |
workflow_dispatch: | |
jobs: | |
build-docs: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
# fetch all commits to get last updated time or other git log info | |
fetch-depth: 0 | |
- name: Setup Node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '16.x' | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
restore-keys: | | |
${{ runner.os }}-node- | |
- name: Install packages | |
if: steps.yarn-cache.outputs.cache-hit != 'true' | |
run: yarn --frozen-lockfile | |
# run build script | |
- name: Build VitePress site | |
run: yarn docs:build | |
- name: Deployment | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./docs/.vitepress/dist |