Skip to content

Auto saved by Logseq #4

Auto saved by Logseq

Auto saved by Logseq #4

Workflow file for this run

name: Deploy Site
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup | Node
uses: actions/setup-node@v2
with:
node-version: "14"
- name: Install latest npm
run: npm i -g npm
- name: Cache node modules
uses: actions/cache@v2
env:
cache-name: cache-node-modules
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 }}-
- name: Install dependencies
run: npm i
working-directory: .layouts
- name: Build Site
run: npm run build
working-directory: .layouts
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./.layouts/public
github_token: ${{ secrets.GITHUB_TOKEN }}