Merge pull request #1007 from Web3Auth/sfa-android-v3 #1158
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: ci for documentation | |
on: | |
push: | |
branches: | |
- master | |
env: | |
REACT_CONTENTFUL_SPACE: ${{ secrets.REACT_CONTENTFUL_SPACE }} | |
REACT_CONTENTFUL_TOKEN: ${{ secrets.REACT_CONTENTFUL_TOKEN }} | |
IB_ENV: production | |
jobs: | |
build-deploy: | |
name: Build and Deploy | |
strategy: | |
matrix: | |
node: ["18.x"] | |
os: [ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: setup node | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: Get npm cache directory | |
id: npm-cache | |
run: | | |
echo "::set-output name=dir::$(npm config get cache)" | |
- name: Node dependency cache | |
uses: actions/cache@v2 | |
with: | |
path: ${{ steps.npm-cache.outputs.dir }} | |
key: ${{ matrix.os }}-node-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ matrix.os }}-node- | |
- name: Install dependencies | |
run: npm ci | |
- name: Generate build | |
run: npm run build | |
- name: Deploy to S3 | |
uses: jakejarvis/s3-sync-action@master | |
with: | |
args: --delete | |
env: | |
SOURCE_DIR: build | |
AWS_S3_BUCKET: docs.web3auth.io | |
AWS_REGION: us-east-1 | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: Invalidate CDN | |
uses: chetan/invalidate-cloudfront-action@master | |
env: | |
DISTRIBUTION: ${{ secrets.AWS_CLOUDFRONT_DISTRIBUTION_ID }} | |
PATHS: "/*" | |
AWS_REGION: us-east-1 | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
- name: Invalidate Website CDN | |
uses: chetan/invalidate-cloudfront-action@master | |
env: | |
DISTRIBUTION: ${{ secrets.AWS_WEBSITE_CLOUDFRONT_DISTRIBUTION_ID }} | |
PATHS: "/*" | |
AWS_REGION: us-east-1 | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |