46 lines
1.3 KiB
YAML
46 lines
1.3 KiB
YAML
name: Build the Editor
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
paths:
|
|
- 'editor/src/**'
|
|
- 'editor/public/**'
|
|
- 'editor/package-lock.json'
|
|
- 'editor/package.json'
|
|
- 'editor/vue.config.js'
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
# Checks-out the repository under $GITHUB_WORKSPACE, so the job can access it
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
|
|
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
|
|
|
|
# set up NodeJS
|
|
- uses: actions/setup-node@main
|
|
|
|
- name: Install project dependencies
|
|
run: npm ci
|
|
working-directory: ./editor
|
|
|
|
- name: Build the project
|
|
run: npm run build
|
|
working-directory: ./editor
|
|
|
|
- name: Perform post build actions
|
|
run: rm -r node_modules
|
|
working-directory: ./editor
|
|
|
|
- name: Commit files
|
|
run: |
|
|
git config --local user.email "action@github.com"
|
|
git config --local user.name "GitHub Action"
|
|
git add -A
|
|
git commit -m "New build of the Editor"
|
|
- name: Push changes
|
|
uses: ad-m/github-push-action@master
|
|
with:
|
|
github_token: ${{ secrets.PERSONAL_TOKEN }}
|