This repository has been archived by the owner on Feb 19, 2025. It is now read-only.
chore: change endpoint #15
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: Injective Faucet Deployments | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
mainnet: | |
env: | |
## Public | |
APP_NAME: 'Injective Faucet: Access Unlimited DeFi Markets' | |
APP_BASE_URL: https://faucet.injective.network | |
APP_NETWORK: testnetK8s | |
APP_ENV: testnet | |
APP_CHAIN_ID: 42 | |
SOURCE_DIR: dist | |
DEST_DIR: www | |
## Flags | |
ACTIONS_ALLOW_UNSECURE_COMMANDS: true | |
MAINTENANCE_ENABLED: false | |
METRICS_ENABLED: true | |
TRANSFER_RESTRICTIONS_ENABLED: false | |
## Secret | |
APP_API_FAUCET_ENDPOINT: ${{ secrets.APP_API_FAUCET_ENDPOINT }} | |
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
AWS_S3_BUCKET: ${{ secrets.AWS_S3_BUCKET }} | |
CLOUDFRONT_DISTRIBUTION_ID: ${{ secrets.CLOUDFRONT_DISTRIBUTION_ID }} | |
AWS_REGION: ${{ secrets.AWS_REGION }} | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v1 | |
- name: Using Node ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 14.x | |
- name: Install Dependencies | |
run: yarn install | |
- name: Building the project | |
run: yarn build | |
- name: Generating the static pages | |
run: yarn generate | |
- name: Use AWS CLI | |
uses: chrislennon/action-aws-cli@v1.1 | |
- name: Sync to S3 bucket | |
run: aws s3 sync dist/ s3://$AWS_S3_BUCKET/www --follow-symlinks --delete --exclude 'static/chart/*' | |
- name: Set Cache Headers | |
run: aws s3 cp s3://$AWS_S3_BUCKET/www s3://$AWS_S3_BUCKET/www --exclude "*" --include "*.js" --include "*.css" --include "*.svg" --include "*.woff2" --include "*.woff" --include "*.ttf" --recursive --metadata-directive REPLACE --expires 2034-01-01T00:00:00Z --cache-control max-age=2592000,public | |
- name: Invalidate Cloudfront CDN | |
run: aws cloudfront create-invalidation --distribution-id=$CLOUDFRONT_DISTRIBUTION_ID --paths "/*" |