Move scripts to a dedicated directory

(cherry picked from commit df59d6ca54dc5b4bf88f3ee81c2c09cc23d925b7)
This commit is contained in:
Nguyen Thai
2024-01-10 11:42:04 +07:00
committed by Dat H. Pham
parent 705a54ba5c
commit 3c7c7249d7
13 changed files with 57 additions and 29 deletions
+3 -6
View File
@@ -30,21 +30,18 @@ jobs:
cache-path: ${{ runner.tool_cache }}/flutter # optional, change this to specify the cache path
- name: Run prebuild
run: bash prebuild.sh
run: ./scripts/prebuild.sh
- name: Configure environments
id: configure
env:
FOLDER: ${{ github.event.pull_request.number }}
run: |
sed -i "s|SERVER_URL=.*|SERVER_URL=https://apisix.upn.integration-open-paas.org/|g" env.file
sed -i "s|DOMAIN_REDIRECT_URL=.*|DOMAIN_REDIRECT_URL=https://$GITHUB_REPOSITORY_OWNER.github.io/${GITHUB_REPOSITORY##*/}/$FOLDER|g" env.file
echo "URL=https://$GITHUB_REPOSITORY_OWNER.github.io/${GITHUB_REPOSITORY##*/}/$FOLDER" >> $GITHUB_OUTPUT
run: ./scripts/configure-web-environment.sh
- name: Build
env:
FOLDER: ${{ github.event.pull_request.number }}
run: flutter build web --profile --verbose --base-href "/${GITHUB_REPOSITORY##*/}/$FOLDER/"
run: ./scripts/build-web.sh
- name: Deploy to Github Pages
uses: peaceiris/actions-gh-pages@v3