Skip to content

Commit

Permalink
add doc upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Zyie committed Jun 16, 2024
1 parent 8433cc7 commit c6ee102
Show file tree
Hide file tree
Showing 4 changed files with 16,678 additions and 6,972 deletions.
34 changes: 34 additions & 0 deletions .github/actions/setup/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: "Install Project"
description: "Installs node, npm, and dependencies"
inputs:
node-version:
description: "Node.js version"
required: true
default: "20"
npm-version:
description: "npm version"
required: true
default: "8"
runs:
using: "composite"
steps:
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ inputs.node-version }}
registry-url: "https://registry.npmjs.org"
- name: Install npm
shell: bash
run: npm install -g npm@${{ inputs.npm-version }}
- name: Cache Dependencies
id: node-modules-cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-modules-
- name: Install Dependencies
if: steps.node-modules-cache.outputs.cache-hit != 'true'
shell: bash
run: npm ci
32 changes: 32 additions & 0 deletions .github/workflows/deploy-docs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy Doc

on:
push:
branches:
- main
- docs

concurrency:
group: ${{ github.workflow }}-${{ github.ref || github.run_id }}
cancel-in-progress: true

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Setup Project
uses: ./.github/actions/setup

- name: Build Project
run: |
git config --global user.name "${{ github.actor }}"
git config --global user.email "${{ github.actor_id }}+${{ github.actor }}@users.noreply.github.com"
git remote set-url origin https://git:${GITHUB_TOKEN}@github.com/pixijs/spine-v8.git
npm run build
npm run upload -- -u "github-actions-bot <[email protected]>"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit c6ee102

Please sign in to comment.