Skip to content

Commit

Permalink
basic stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
BachErik committed Jul 6, 2024
0 parents commit 4563505
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main # oder der Name deines Hauptbranches

jobs:
build-and-deploy:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '^1.17' # Wähle die Go-Version

- name: Build Go project
run: go build -o ./server ./main.go

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./ # Das Verzeichnis, das die ausführbare Datei enthält
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# killedby
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module bacherik/killedby

go 1.22.4
15 changes: 15 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package main

import (
"fmt"
"net/http"
)

func helloHandler(w http.ResponseWriter, r *http.Request) {
fmt.Fprintf(w, "Hello World!")
}

func main() {
http.HandleFunc("/", helloHandler)
http.ListenAndServe(":8080", nil)
}

0 comments on commit 4563505

Please sign in to comment.