Skip to content
This repository was archived by the owner on Jun 26, 2025. It is now read-only.

Deploy to Server

Deploy to Server #42

Workflow file for this run

on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow}}
cancel-in-progress: true
name: Deploy to Server
jobs:
deploy:
runs-on: ubuntu-latest
env:
TF_VAR_remote_user: ${{ secrets.SERVER_USER }}
TF_VAR_remote_host: ${{ secrets.SERVER_IP }}
TF_VAR_remote_directory: /opt/progsoc/progcomp2025/competition
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Tailscale
uses: tailscale/github-action@v3
with:
tags: tag:ci
oauth-client-id: ${{ secrets.TS_OAUTH_CLIENT_ID }}
oauth-secret: ${{ secrets.TS_OAUTH_SECRET }}
use-cache: 'true'
- uses: hashicorp/setup-terraform@v3
- name: Init OpenTofu
working-directory: deploy
run: terraform init -input=false
- name: Apply OpenTofu
working-directory: deploy
run: terraform apply -auto-approve -input=false -no-color