This commit is contained in:
kaelta 2022-02-06 06:35:16 +00:00
parent 94366b78cb
commit c4e8ff73d1
3 changed files with 53 additions and 0 deletions

View File

@ -0,0 +1,51 @@
name: Deploy Site
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Setup | Node
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v2
id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install dependencies
run: yarn
working-directory: _layouts
- name: Get repository name
run: echo ::set-env name=REPOSITORY_NAME::$(echo "$GITHUB_REPOSITORY" | awk -F / '{print $2}')
shell: bash
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: 'true'
- name: Build Site
run: yarn build
working-directory: _layouts
env:
PATH_PREFIX: /${{ env.REPOSITORY_NAME }}
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_dir: ./_layouts/public
github_token: ${{ secrets.GITHUB_TOKEN }}

View File

2
run_webview.py Executable file
View File

@ -0,0 +1,2 @@
#!/usr/bin/env python3
import os; os.system("cd _layouts && yarn && yarn dev")