Skip to content

Commit

Permalink
Merge branch 'master' into bug-fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelfangjw committed Jun 22, 2021
2 parents 000c6f2 + 761ed2c commit 834753b
Showing 1 changed file with 23 additions and 17 deletions.
40 changes: 23 additions & 17 deletions .github/workflows/build-development.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build source-academy.github.io
name: Build sourceacademy.org
on:
push:
branches:
Expand All @@ -14,6 +14,9 @@ jobs:
uses: actions/setup-node@v2-beta
with:
node-version: '14'
- name: Setup Sentry CLI
run: |
curl -sL https://sentry.io/get-cli/ | INSTALL_DIR=. bash
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
Expand Down Expand Up @@ -50,28 +53,31 @@ jobs:
REACT_APP_ENVIRONMENT: "pages"
REACT_APP_MODULE_BACKEND_URL: https://source-academy.github.io/modules
REACT_APP_SHAREDB_BACKEND_URL: ${{ secrets.REACT_APP_SHAREDB_BACKEND_URL }}
REACT_APP_SW_EXCLUDE_REGEXES: '["^/source", "^/sicp", "^/modules", "^/ev3-source"]'
PUBLIC_URL: "https://source-academy.github.io"
PUBLIC_URL: "https://sourceacademy.org"
REACT_APP_GITHUB_OAUTH_PROXY_URL: ${{ secrets.REACT_APP_GITHUB_OAUTH_PROXY_URL }}
REACT_APP_GITHUB_CLIENT_ID: ${{ secrets.REACT_APP_GITHUB_CLIENT_ID }}
- name: Create symbolic links
- name: Create Sentry release
working-directory: build
run: |
SENTRY_RELEASE="cadet-frontend@$REACT_APP_VERSION"
"$GITHUB_WORKSPACE/sentry-cli" releases new -p "$SENTRY_PROJECT" "$SENTRY_RELEASE"
"$GITHUB_WORKSPACE/sentry-cli" releases set-commits --auto "$SENTRY_RELEASE"
"$GITHUB_WORKSPACE/sentry-cli" releases files "$SENTRY_RELEASE" upload-sourcemaps --url-prefix '~/static/js' --rewrite static/js
"$GITHUB_WORKSPACE/sentry-cli" releases finalize "$SENTRY_RELEASE"
"$GITHUB_WORKSPACE/sentry-cli" releases deploys "$SENTRY_RELEASE" new -e pages
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: sourceacademy
SENTRY_PROJECT: cadet-frontend
REACT_APP_VERSION: ${{ format('{0}-{1}', github.sha, steps.get-time.outputs.time) }}
- name: Remove sourcemaps
working-directory: build
run: |
set -euxo pipefail
ln -s index.html build/playground.html
ln -s index.html build/contributors.html
ln -s index.html build/sourcecast.html
ln -s index.html build/interactive-sicp.html
mkdir -p build/interactive-sicp
declare -a arr=("index" "foreword" "prefaces03" "prefaces84" "prefaces96" "acknowledgements" "1" "1.1" "1.1.1" "1.1.2" "1.1.3" "1.1.4" "1.1.5" "1.1.6" "1.1.7" "1.1.8" "1.2" "1.2.1" "1.2.2" "1.2.3" "1.2.4" "1.2.5" "1.2.6" "1.3" "1.3.1" "1.3.2" "1.3.3" "1.3.4" "2" "2.1" "2.1.1" "2.1.2" "2.1.3" "2.1.4" "2.2" "2.2.1" "2.2.2" "2.2.3" "2.2.4" "2.3" "2.3.1" "2.3.2" "2.3.3" "2.3.4" "2.4" "2.4.1" "2.4.2" "2.4.3" "2.5" "2.5.1" "2.5.2" "2.5.3" "3" "3.1" "3.1.1" "3.1.2" "3.1.3" "3.2" "3.2.1" "3.2.2" "3.2.3" "3.2.4" "3.3" "3.3.1" "3.3.2" "3.3.3" "3.3.4" "3.3.5" "3.4" "3.4.1" "3.4.2" "3.5" "3.5.1" "3.5.2" "3.5.3" "3.5.4" "3.5.5" "4" "4.1" "4.1.1" "4.1.2" "4.1.3" "4.1.4" "4.1.5" "4.1.6" "4.1.7" "4.2" "4.2.1" "4.2.2" "4.2.3" "4.3" "4.3.1" "4.3.2" "4.3.3" "4.4" "4.4.1" "4.4.2" "4.4.3" "4.4.4" "5" "5.1" "5.1.1" "5.1.2" "5.1.3" "5.1.4" "5.1.5" "5.2" "5.2.1" "5.2.2" "5.2.3" "5.2.4" "5.3" "5.3.1" "5.3.2" "5.4" "5.4.1" "5.4.2" "5.4.3" "5.4.4" "5.5" "5.5.1" "5.5.2" "5.5.3" "5.5.4" "5.5.5" "5.5.6" "5.5.7" "references" "making-of")
for i in "${arr[@]}"; do
ln -s ../index.html build/interactive-sicp/$i.html
done
# the `ln`s above are a hack to make GitHub Pages route /playground
# and /contributors etc to index, instead of 404-ing.
find -name '*.map' -print -delete
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
external_repository: source-academy/source-academy.github.io
external_repository: source-academy/sourceacademy.org
deploy_key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
publish_dir: ./build
publish_branch: master
Expand Down

0 comments on commit 834753b

Please sign in to comment.