Skip to content

feat: aws redirect records #124

feat: aws redirect records

feat: aws redirect records #124

Workflow file for this run

name: Release Latest
on:
push:
branches: [main]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Setup | Checkout
uses: actions/checkout@v4
- name: Setup | Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
- name: Setup | Trunk
uses: jetli/[email protected]
with:
version: "latest"
- name: Build | Trunk
run: trunk build --release
- name: Post Setup | Upload dist
uses: actions/upload-artifact@v4
with:
path: ./dist/
aws:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup | Download dist
uses: actions/download-artifact@v4
- name: Setup | Place dist
run: mv ./artifact/ ./dist/
- 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: ${{ secrets.AWS_REGION }}
role-duration-seconds: 3600
role-session-name: GitHubActions
- name: Setup | Terraform
uses: hashicorp/setup-terraform@v3
env:
TF_ACTION_WORKING_DIR: 'terraform'
- name: Terraform | Apply
run: |
cd terraform
terraform init
terraform apply -auto-approve
env:
TF_VAR_cloudflare_api_token: ${{ secrets.CLOUDFLARE_API_TOKEN }}
TF_VAR_aws_region: ${{ secrets.AWS_REGION }}
TF_VAR_aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
TF_VAR_aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Deploy | S3
run: |
aws s3 sync ./dist/ s3://www.spencer.imbleau.com --delete