Skip to content

doc(tc39/stage4): Change Array by copy #355

doc(tc39/stage4): Change Array by copy

doc(tc39/stage4): Change Array by copy #355

Workflow file for this run

name: Build the book
on:
push:
branches:
- docs
concurrency: building
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: docs
fetch-depth: 0 # all history for building
- uses: actions/setup-node@v2-beta
with:
node-version: '16'
- name: Configure
run: |
git version
git clone --depth=1 --branch=build https://github.com/aleen42/PersonalWiki.git temp
mv -f temp/* ./
mv temp/.bookignore ./
git clone --depth=1 --branch=gh-pages https://github.com/aleen42/PersonalWiki.git gh-pages
- name: Dependencies
id: cache-npm
uses: actions/cache@v3
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.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- if: ${{ steps.cache-npm.outputs.cache-hit == 'false' }}
name: List dependencies
continue-on-error: true
run: npm list
- name: Build
run: |
npm version
npm install --no-save --no-audit
npm run gitbook:install
npm run gitbook:build
node ./config.js
env:
ACCESS_TOKEN: ${{secrets.ACCESS_TOKEN}}
- name: Deploy
uses: aleen42/github-pages-deploy-action@master
env:
ACCESS_TOKEN: ${{secrets.ACTION_TOKEN}}
BRANCH: gh-pages
FOLDER: gh-pages