GA Release Website working #20
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: release website | |
on: | |
push: | |
branches: [realm] | |
jobs: | |
build-and-release: | |
name: Build App and release | |
runs-on: ubuntu-latest | |
env: | |
BUCKET: shikengno.xyz | |
DIST: build | |
REGION: us-east-1 | |
REPO_COSMJS: https://github.com/cosmos/cosmjs.git | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
aws-region: ${{ env.REGION }} | |
- name: Install dependencies | |
run: | | |
node --version | |
npm ci --production | |
- name: Build website | |
run: | | |
ls | |
git clone ${{ env.REPO_COSMJS }} | |
for p in amino crypto encoding ledger-amino math utils | |
do | |
echo " > Fixing issues in $p" | |
cp -r cosmjs/packages/$p/src node_modules/@cosmjs/$p | |
done | |
npm run build | |
- name: Delete old files to AWS | |
run: | | |
aws s3 ls s3://${{ env.BUCKET }} | |
aws s3 rm --recursive s3://${{ env.BUCKET }}/ | |
- name: Add new files to AWS | |
run: | | |
aws s3 sync build/ s3://${{ env.BUCKET }}/ --delete |