diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7785297a3..38a544ed3 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -27,7 +27,7 @@ jobs: - run: yarn install --frozen-lock-file - run: yarn lint - run: yarn test - - run: ./build.sh --prod + - run: ./build.sh --mode production - uses: JamesIves/github-pages-deploy-action@3.7.1 with: GITHUB_TOKEN: ${{ secrets.JEKYLL_PAT }} diff --git a/build.sh b/build.sh index ba85ad1cb..ba5f6d471 100755 --- a/build.sh +++ b/build.sh @@ -6,9 +6,9 @@ mode="development" while [ $# -gt 0 ]; do case $1 in - --prod) + --mode) shift - mode="production" + mode="$1" ;; esac shift @@ -24,7 +24,7 @@ cd ../ if [ "$mode" == "development" ]; then yarn build --mode "$mode" --site "http://centrapay-docs.dev.s3-website-ap-southeast-1.amazonaws.com" else - yarn build + yarn build --mode "$mode" fi rsync -a dist/* _site/