-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
54 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,37 @@ | ||
# name: Build and Deploy | ||
name: Build and Deploy | ||
|
||
# on: | ||
# push: | ||
# branches: | ||
# - main | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
# jobs: | ||
# build: | ||
# runs-on: ubuntu-latest | ||
# steps: | ||
# - uses: actions/checkout@v2 | ||
# - name: Download and install LAUX | ||
# run: | | ||
# git clone https://github.com/8char/laux-compiler.git | ||
# cd laux-compiler | ||
# npm install | ||
# npm run build | ||
# npm link | ||
# cd .. | ||
# timeout-minutes: 0.25 | ||
# - name: Compile repository | ||
# run: lauxc workspace | ||
# - name: Delete files and folders | ||
# run: | | ||
# rm -rf $(find . -type f ! -name 'lua' ! -name 'materials') | ||
# rm -rf $(find . -type d ! -name 'lua' ! -name 'materials') | ||
# - name: Create release artifact | ||
# run: zip -r artifact.zip . | ||
# env: | ||
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
# - name: Upload release artifact | ||
# uses: actions/upload-release-asset@v1 | ||
# with: | ||
# upload_url: ${{ github.event.release.upload_url }} | ||
# asset_path: artifact.zip | ||
# asset_name: release.zip | ||
# asset_content_type: application/zip | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Download and install LAUX | ||
run: | | ||
git clone https://github.com/8char/laux-compiler.git | ||
cd laux-compiler | ||
npm install | ||
npm run build | ||
npm link | ||
cd .. | ||
- name: Compile repository | ||
run: ./transpile.sh | ||
- name: Delete files and folders | ||
run: | | ||
rm -rf $(find . -type f ! -name 'lua' ! -name 'materials') | ||
rm -rf $(find . -type d ! -name 'lua' ! -name 'materials') | ||
- name: Create release artifact | ||
run: zip -r artifact.zip . | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Upload release artifact | ||
uses: actions/upload-release-asset@v1 | ||
with: | ||
upload_url: ${{ github.event.release.upload_url }} | ||
asset_path: artifact.zip | ||
asset_name: release.zip | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
#!/bin/bash | ||
|
||
# Run the transpiler in the background | ||
lauxc workspace & | ||
|
||
# Get the process ID of the transpiler | ||
transpiler_pid=$! | ||
|
||
# Wait for 20 seconds | ||
sleep 20 | ||
|
||
# Check if the transpiler is still running | ||
if kill -0 "$transpiler_pid" >/dev/null 2>&1; then | ||
# If it is, kill it | ||
kill "$transpiler_pid" | ||
fi | ||
|
||
# Finally exit! | ||
exit 0 |