mirror of
https://github.com/lmg-anon/mikupad.git
synced 2026-07-09 17:19:17 +00:00
added compile workflow
This commit is contained in:
parent
4914910a2d
commit
91eacb24af
1 changed files with 53 additions and 0 deletions
53
.github/workflows/compile_mikupad.yml
vendored
Normal file
53
.github/workflows/compile_mikupad.yml
vendored
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
name: compile mikupad
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: '16'
|
||||
|
||||
- name: Copy mikupad.html to project directory
|
||||
run: cp -f mikupad.html project
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm install
|
||||
working-directory: ./project
|
||||
|
||||
- name: Build the project
|
||||
run: npm run build
|
||||
working-directory: ./project
|
||||
|
||||
- name: Copy built mikupad.html to root directory
|
||||
run: cp -f ./project/dist/mikupad.html ./mikupad_compiled.html
|
||||
|
||||
- name: Commit and push changes
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: |
|
||||
git config --global user.name "github-actions[bot]"
|
||||
git config --global user.email "github-actions[bot]@users.noreply.github.com"
|
||||
git add -f mikupad_compiled.html
|
||||
git commit -m "Update mikupad_compiled.html"
|
||||
git push origin main
|
||||
|
||||
- name: Upload artifact
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: mikupad_compiled
|
||||
path: mikupad_compiled.html
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue