Skip to content

Commit

Permalink
Merge pull request #4 from KristienN/fix-deploy
Browse files Browse the repository at this point in the history
feat: Implement provisoning of the droplet
  • Loading branch information
KristienN authored Dec 2, 2024
2 parents 09dcbb7 + d2787b9 commit 4e8ce62
Showing 1 changed file with 13 additions and 6 deletions.
19 changes: 13 additions & 6 deletions .github/workflows/main-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,20 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: "setup ssh keys"
run: echo "dummy job"
- name: "Set up Terraform"
uses: hashicorp/setup-terraform@v3
with:
terraform_version: 1.9.8

- name: "terraform commands"
run: |
echo "terraform init"
echo "terraform plan -var digitalocean_access_token=$DIGITALOCEAN_ACCESS_TOKEN"
echo "terraform apply -var digitalocean_access_token=$DIGITALOCEAN_ACCESS_TOKEN"
terraform init
terraform plan -var digitalocean_access_token=$DIGITALOCEAN_ACCESS_TOKEN -out=tfplan
terraform apply -var digitalocean_access_token=$DIGITALOCEAN_ACCESS_TOKEN -auto-approve tfplan
env:
DIGITALOCEAN_ACCESS_TOKEN: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
DIGITALOCEAN_ACCESS_TOKEN: ${{ secrets.DIGITALOCEAN_ACCESS_TOKEN }}
- name: "Post-deployment testing"
run: |
terraform output -raw droplet_ip > droplet_ip.txt
DROPLET_IP=$(cat droplet_ip.txt)
curl -I http://DROPLET_IP

0 comments on commit 4e8ce62

Please sign in to comment.