Merge pull request #190 from zestyxyz/iframe-fix #433
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: check-deploy | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- v2 | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- run: | | |
chmod +x scripts/build.sh | |
chmod +x scripts/deploy.sh | |
scripts/build.sh | |
- name: Test | |
run: | | |
cd ~/work/ads-sdk/ads-sdk | |
npx playwright install | |
yarn run test | |
deploy: | |
runs-on: ubuntu-latest | |
needs: test | |
if: ${{ always() && (contains(needs.test.result, 'success') || contains(github.event.head_commit.message, '[test skip]')) }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- run: | | |
chmod +x scripts/build.sh | |
chmod +x scripts/deploy.sh | |
scripts/build.sh | |
- name: Deploy | |
run: | | |
scripts/deploy.sh | |
- name: Upload to S3 | |
uses: jakejarvis/s3-sync-action@master | |
env: | |
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_REGION: 'us-east-1' | |
SOURCE_DIR: 'dist' | |
DEST_DIR: 'sdk' |