Skip to content

Commit d51c94e

Browse files
Update README.md (#15)
1 parent 9e93c35 commit d51c94e

1 file changed

Lines changed: 71 additions & 4 deletions

File tree

README.md

Lines changed: 71 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,73 @@
1-
## README
1+
# Prior Year Access – File Your State Taxes
22

3-
### How to compile sass files
4-
This repo uses the gem `dart-sass` to compile the .scss files.
3+
This repository supports **Prior Year Access** for users of **File Your State Taxes**. It allows individuals who filed their state taxes with us in **2023** or **2024** to securely retrieve their tax return PDFs.
54

6-
To run this locally, use the command: `bin/rake dartsass:build`
5+
6+
---
7+
8+
## Infrastructure with OpenTofu
9+
10+
This project uses OpenTofu to manage infrastructure as code. It provisions and maintains various cloud resources, including:
11+
12+
- S3 buckets
13+
- EC2 instances
14+
- IAM roles
15+
16+
The infrastructure for this repository is located in the [CFA Tax-Benefits-Backend repository](https://github.com/codeforamerica/tax-benefits-backend)
17+
[Staging](https://github.com/codeforamerica/tax-benefits-backend/tree/main/tofu/config/staging.pya.fileyourstatetaxes.org)
18+
[Production](https://github.com/codeforamerica/tax-benefits-backend/tree/main/tofu/config/pya.fileyourstatetaxes.org)
19+
20+
### CI/CD Integration
21+
22+
OpenTofu is integrated into our CI pipeline.
23+
---
24+
25+
## Deployment to AWS Staging
26+
27+
This project uses a GitHub Actions workflow to automatically deploy to the AWS staging environment after tests pass on the `main` branch.
28+
29+
### Workflow Breakdown
30+
31+
#### 1. Test Job
32+
33+
- Runs the full Rails test suite:
34+
```bash
35+
bin/rails db:test:prepare test test:system
36+
```
37+
- Sends test status notifications to Slack, tagging the appropriate team members
38+
39+
#### 2. Deploy Job
40+
41+
- Executes only if the test job completes successfully
42+
- Builds a Docker image and pushes it to Amazon ECR
43+
- Updates an AWS Systems Manager (SSM) parameter with the image tag to track the deployed version
44+
- Triggers a downstream GitHub Action in the [`tax-benefits-backend`](https://github.com/codeforamerica/tax-benefits-backend) repository using a `repository_dispatch` event, passing:
45+
46+
```json
47+
{
48+
"environment": "pya-nonprod",
49+
"config": "staging.pya.fileyourstatetaxes.org"
50+
}
51+
```
52+
The deploy job can be triggered manually by navigating to the github actions page and running the `Deploy to AWS Staging` action.
53+
54+
### Environment Variables & Secrets
55+
56+
The workflow relies on the following secrets:
57+
58+
- `AWS_ACCESS_KEY` / `AWS_SECRET_KEY`: Credentials for accessing AWS services (ECR, SSM)
59+
- `SLACK_WEBHOOK_URL`: Sends Slack notifications for test results
60+
- `STAGING_DEPLOY_PAT`: GitHub Personal Access Token used to trigger the downstream deployment workflow
61+
62+
The staging PAT will need to be regenerated every 90 days and updated in Github and Lastpass
63+
---
64+
65+
## Stylesheet Compilation
66+
67+
This project uses the [`dart-sass`](https://rubygems.org/gems/dart-sass) Ruby gem to compile SCSS files.
68+
69+
To compile stylesheets locally:
70+
71+
```bash
72+
bin/rake dartsass:build
73+
```

0 commit comments

Comments
 (0)