update url #25
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: publish | |
on: | |
push: | |
branches-ignore: | |
- 'gh-pages' | |
paths-ignore: | |
- '*.md' | |
- 'docs/**' | |
- 'screenshots/**' | |
pull_request: | |
paths-ignore: | |
- '*.md' | |
- 'docs/**' | |
- 'screenshots/**' | |
jobs: | |
build: | |
# ubuntu 18.04 comes with lein + java8 installed | |
runs-on: ubuntu-18.04 | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 1 | |
submodules: 'true' | |
- name: Install Java 11 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '11' | |
distribution: 'adopt' | |
- name: Install clojure tools | |
uses: DeLaGuardo/setup-clojure@10.1 | |
with: | |
cli: 1.10.3.943 | |
- name: Install PNPM | |
uses: pnpm/action-setup@v2.2.4 | |
with: | |
version: 6.16.1 | |
- name: Cache node deps | |
uses: actions/cache@v3 | |
id: cache-node-deps | |
with: | |
path: ./node_modules | |
key: node-modules-${{ hashFiles('package.json') }} | |
- name: Fetch node deps | |
if: steps.cache-node-deps.outputs.cache-hit != 'true' | |
run: | | |
pnpm install --shamefully-hoist | |
- name: Cache shadow-cljs deps | |
uses: actions/cache@v2 | |
id: cache-shadow-cljs-deps | |
with: | |
path: ~/.m2/repository | |
key: maven-${{ hashFiles('shadow-cljs.edn') }}-v2 | |
- name: Launch shadow-cljs | |
run: | | |
scripts/launch_shadow_cljs.sh | |
# TODO: ci build&test could be run in parallel to yarn release&cypress | |
# test, which could save some time. | |
- name: Run CLJS Tests | |
run: | | |
yarn ci-build | |
yarn ci-test | |
- name: Build | |
run: | | |
yarn release | |
- name: Cache cypress binary | |
uses: actions/cache@v2 | |
id: cache-cypress-binary | |
with: | |
path: /home/runner/.cache/Cypress | |
key: cypress-${{ hashFiles('package.json') }} | |
- name: Install cypress binary | |
if: steps.cache-cypress-binary.outputs.cache-hit != 'true' | |
run: | | |
yarn cypress install | |
- name: Run Cypress Test | |
run: | | |
cy_key="${{ secrets.CYPRESS_KEY }}" | |
if [[ $cy_key != "" ]]; then | |
run_args="--record --key ${{ secrets.CYPRESS_KEY }}" | |
fi | |
CYPRESS_BASE_URL=http://127.0.0.1:13345 yarn cypress run $run_args | |
- name: Deploy to GitHub Pages | |
if: github.ref == 'refs/heads/master' | |
run: | | |
cat >~/.netrc<<EOF | |
machine github.com | |
login lucywang000 | |
password ${{ secrets.GITHUB_TOKEN }} | |
EOF | |
./scripts/publish.sh |