DeTTECT/.github/workflows/build_Editor.yml

46 lines
1.3 KiB
YAML
Raw Normal View History

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@master
2020-07-16 13:58:38 +00:00
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@master
- name: Instal project dependencies
run: npm install
working-directory: ./editor
- name: Build the project
run: npm run build
working-directory: ./editor
- name: Peform post build actions
run: rm -r node_modules
working-directory: ./editor
2020-07-16 13:32:12 +00:00
- name: Commit files
run: |
2020-07-16 13:58:38 +00:00
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"
2020-07-16 13:32:12 +00:00
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.PERSONAL_TOKEN }}