Merge branch 'dev' into alpha #64
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
name: Build Project and push JavaScript to dedicated branch | |
on: | |
push: | |
branches: | |
- dev | |
- alpha | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install dependencies | |
# Ignore postinstall because we don't need to run test in this build | |
run: yarn --ignore-scripts | |
- name: Build project | |
# `exit 0` temporarily so it ignores all the many many many build errors | |
run: | | |
yarn build --pretty > typescript_build.log || exit 0 | |
- name: Send error count to Webhook | |
env: | |
WEBHOOK_URL: ${{ secrets.DISCORD_WEBHOOK }} | |
COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | |
run: | | |
node .github/send_typescript_info.mjs | |
- name: Make sure we don't push source files | |
run: | | |
sed -i 's/^js//' .gitignore | |
sed -i 's/^css//' .gitignore | |
rm -rf src | |
rm -rf styles | |
rm typescript_build.log | |
- name: Switch to JavaScript branch | |
run: | | |
git fetch | |
git reset --soft origin/javascript/$GITHUB_REF_NAME | |
git switch javascript/$GITHUB_REF_NAME | |
- name: Commit all changes | |
run: | | |
git config --local user.email "[email protected]" | |
git config --local user.name "GitHub Actions" | |
git add . | |
git commit -m "Automatic build of commit \`$GITHUB_SHA\`" -a | |
git push |