Skip to content

ci: Create bench server with Terraform #1

ci: Create bench server with Terraform

ci: Create bench server with Terraform #1

Workflow file for this run

name: Deploy AWS Server with Terraform
on:
push:
branches: ci-bench-server
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: hashicorp/setup-terraform@v3
- name: Initialize Terraform
run: terraform -chdir=${{ github.workspace }}/.github/server-setup init
- name: Apply Terraform changes
run: terraform -chdir=${{ github.workspace }}/.github/server-setup apply -auto-approve -input=false
env:
TF_VAR_aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
TF_VAR_aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TF_VAR_server_pub_key: ${{ secrets.SERVER_PUB_KEY }}
TF_VAR_server_private_key: ${{ secrets.SERVER_PRIVATE_KEY }}
- run: terraform -chdir=${{ github.workspace }}/.github/server-setup destroy -auto-approve -input=false
env:
TF_VAR_aws_access_key_id: ${{ secrets.AWS_ACCESS_KEY_ID }}
TF_VAR_aws_secret_access_key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TF_VAR_server_pub_key: ${{ secrets.SERVER_PUB_KEY }}
TF_VAR_server_private_key: ${{ secrets.SERVER_PRIVATE_KEY }}
#- name: Tailscale
# uses: tailscale/github-action@v2
# with:
# oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
# oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
# tags: tag:ci