Skip to content

update with SCRIPT module impoart #38

update with SCRIPT module impoart

update with SCRIPT module impoart #38

Workflow file for this run

name: Deploy LiaScript LiveEditor to Pages
on:
# Runs on pushes targeting the default branch
push:
branches:
- main
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: write
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: 'pages'
cancel-in-progress: false
# Default to bash
defaults:
run:
shell: bash
jobs:
# Build job
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Setup Pages
id: pages
uses: actions/configure-pages@v5
- name: Install Node.js dependencies
run: 'npm i'
- name: Build LiveEditor
env:
RESPONSIVEVOICE_KEY: ${{ secrets.RESPONSIVEVOICE_KEY }}
PROXY: ${{ secrets.PROXY_SERVER }}
GITHUB_CLIENT_ID: ${{ secrets.GH_CLIENT_ID }}
GITHUB_CLIENT_SECRET: ${{ secrets.GH_CLIENT_SECRET }}
SIGNALING_SERVER: ${{ secrets.SIGNALING_SERVER }}
WEBSOCKET_SERVER: ${{ secrets.WEBSOCKET_SERVER }}
ICE_SERVERS: ${{ secrets.ICE_SERVERS }}
run: 'npm run build'
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
name: dist
path: ./dist
# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs:
- build
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Checkout gh-pages branch
run: |
git fetch origin gh-pages
git checkout gh-pages || git checkout --orphan gh-pages
- name: Download LiveEditor Artifact
uses: actions/download-artifact@master
with:
name: dist
path: dist
- name: Extract LiveEditor Artifact
run: |
mkdir -p dist
tar -xvf dist/artifact.tar -C dist
rm dist/artifact.tar
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
destination_dir: docs
publish_branch: gh-pages