Skip to content

Workflow Fix 2

Workflow Fix 2 #3

Workflow file for this run

name: GS Editor Deployment
on:
push:
branches:
- main
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
ref: build
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install Dependencies
run: npm install
- name: Build Project
run: npm run build
- name: Copy Build Files
run: |
cp -r dist/* .
rm -rf dist
- name: Commit and Push Changes
env:
TOKEN: ${{ secrets.GRAPHSCRIPT_EDITOR_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git diff --cached --quiet || git commit -m "Deploy GS Editor"
git push https://x-access-token:${TOKEN}@github.com/GraphScript-Labs/graphscript-editor.git HEAD:build