Skip to content

Commit

Permalink
Tidied workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jinglemansweep committed Feb 5, 2024
1 parent 98abfd0 commit 8d4b69a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,32 @@ jobs:

- name: Prepare Filesystem
run: |
mkdir -p .build
mkdir -p ./.build
- name: Create Butane YAML with Terraform
run: |
pushd ./terraform
echo "Initialising Terraform..."
terraform init
echo "Applying Terraform..."
terraform apply -auto-approve
echo "Starting index page..."
echo "<html><head><title>Butane</title><body><h1>Butane</h1><p>Deployed by Terraform</p><ul>" > ../.build/index.html
echo "Getting Terraform JSON outputs..."
for i in "plex" "swarm_manager" "swarm_worker"; do
echo " ... ${i}"
terraform output -raw ${i} > ../.build/${i}.json
echo "<li><a href=\"${i}.json\">${i}</a></li>" >> ../.build/index.html
done
echo "Closing index page..."
echo "</ul></body></html>" >> ../.build/index.html
popd
- name: Deploy
Expand Down

0 comments on commit 8d4b69a

Please sign in to comment.