Repository navigation
Remove bridge (#78) #9
This file contains hidden or 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: Mainnet docs build and publish to S3 | |
| on: | |
| push: | |
| branches: | |
| - "main" | |
| paths: | |
| - "**" | |
| env: | |
| S3_BUCKET: mainnet-static-publish | |
| S3_PREFIX: goat-docs/mainnet | |
| AWS_REGION: us-west-2 | |
| CLOUDFRONT_ID: E1W4G5OJ1TWNNW | |
| jobs: | |
| build-and-deploy: | |
| name: Docs Build and Push to S3 | |
| runs-on: [self-hosted, linux, x64, mainnet-publish] | |
| environment: prod | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install AWS CLI | |
| run: | | |
| curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "/tmp/awscliv2.zip" | |
| unzip -q /tmp/awscliv2.zip -d /tmp | |
| sudo /tmp/aws/install --update || true | |
| aws --version | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID_MAINNET }} | |
| aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY_MAINNET }} | |
| aws-region: ${{ env.AWS_REGION }} | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Build | |
| run: | | |
| npm ci --no-audit --no-fund | |
| npm run build | |
| - name: Sync S3 Bucket | |
| run: | | |
| aws s3 sync ./out/ s3://$S3_BUCKET/$S3_PREFIX/ --delete | |
| - name: Refresh CDN Cache | |
| run: | | |
| aws cloudfront create-invalidation --distribution-id $CLOUDFRONT_ID --paths "/*" |