build(actions): init auto build github actions

This commit is contained in:
Haoyu Xu
2023-06-25 02:44:19 -04:00
parent f17e82ac5b
commit 29672f43b4

32
.github/workflows/gh-pages.yaml vendored Normal file
View File

@@ -0,0 +1,32 @@
name: Build release and push to Github
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npm ci
- name: Build all
run: npm run build-all
- name: Deploy
uses: s0/git-publish-subdir-action@develop
env:
REPO: self
BRANCH: gh-pages
FOLDER: release
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}