keep on hacking on deploy #8
Workflow file for this run
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 and Deploy to GitHub Pages | |
permissions: | |
contents: write | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
env: | |
BOSATSU_CI: "true" | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: "actions/checkout@v2" | |
with: | |
persist-credentials: false # This is important for the step that pushes to gh-pages | |
- uses: "coursier/cache-action@v2" | |
- name: "java 11 setup" | |
uses: "olafurpg/setup-scala@v13" | |
with: | |
java-version: "11" | |
- name: "build app" | |
run: | | |
export NODE_OPTIONS=--openssl-legacy-provider | |
sbt outwatchJS/fullOptJS::webpack | |
mkdir web_deploy | |
mkdir web_deploy/compiler | |
cp outwatch/index.html web_deploy/compiler/ | |
cp outwatch/.js/target/scala-2.13/scalajs-bundler/main/bosatsu-outwatch-opt-bundle.js web_deploy/compiler/bosatsu_ui.js | |
- name: Deploy to GitHub Pages | |
run: | | |
git config --global user.email "[email protected]" | |
git config --global user.name "GitHub Actions" | |
git fetch --depth=1 origin gh-pages | |
git checkout -b gh-pages origin/gh-pages | |
cp -r web_deploy/* . | |
git add . | |
git commit -m "Deploy updates" | |
git push --force origin gh-pages |