Skip to content

Commit

Permalink
Create gh-pages.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
FineArchs committed Nov 3, 2023
1 parent 163a297 commit d0bef8a
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: GitHub Pages

on:
push:
branches:
- master
pull_request:
workflow_dispatch:

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4.1.1

- name: Setup Node.js
uses: actions/setup-node@v4.0.0
with:
node-version: 20.x

- name: AiScript Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: npm-${{ hashFiles('package-lock.json') }}
restore-keys: npm-

- name: AiScript Install dependencies
run: npm ci

- name: AiScript Build
run: npm run build

- name: Cache dependencies
uses: actions/cache@v3
with:
path: ~/.npm
key: npm-playground-${{ hashFiles('playground/package-lock.json') }}
restore-keys: npm-playground-

- name: Install dependencies
run: npm ci
working-directory: ./playground

- name: Build
run: npm run build

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist

0 comments on commit d0bef8a

Please sign in to comment.