feat: code improvements #102
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: Pulumi Deploy | |
on: | |
push: | |
paths: | |
- 'todo-app/**' | |
branches: | |
- main # Trigger on push to the main branch | |
jobs: | |
pulumi-deploy: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: read | |
pull-requests: write | |
repository-projects: write | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 # More information on this action can be found below in the 'AWS Credentials' section | |
with: | |
role-to-assume: ${{ secrets.AWS_ROLE_ARN }} | |
aws-region: ${{ secrets.AWS_REGION }} | |
role-session-name: GithubActionsSession | |
- name: Install Dependencies | |
working-directory: todo-app | |
run: | | |
pip install -r requirements.txt | |
- name: Configure Pulumi | |
working-directory: todo-app | |
run: | | |
pulumi stack select ExitoLab/todo-app/dev --non-interactive || pulumi stack init ExitoLab/todo-app/dev | |
env: | |
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | |
- name: Pulumi Preview | |
working-directory: todo-app | |
run: | | |
pulumi stack select ExitoLab/todo-app/dev | |
env: | |
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} | |
- name: Pulumi Up | |
working-directory: todo-app | |
run: | | |
pulumi up --stack ExitoLab/todo-app/dev --yes | |
env: | |
PULUMI_ACCESS_TOKEN: ${{ secrets.PULUMI_ACCESS_TOKEN }} |