Skip to content

Commit

Permalink
fix: github pages
Browse files Browse the repository at this point in the history
  • Loading branch information
BachErik committed Jul 6, 2024
1 parent 4563505 commit 8910f58
Showing 1 changed file with 21 additions and 7 deletions.
28 changes: 21 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,18 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main # oder der Name deines Hauptbranches
# Trigger the workflow every time you push to the `main` branch
# Using a different branch name? Replace `main` with your branch’s name
push:
branches: [main]
# Allows you to run this workflow manually from the Actions tab on GitHub.
workflow_dispatch:

# Allow this job to clone the repo and create a page deployment
permissions:
contents: read
pages: write
id-token: write

jobs:
build-and-deploy:
Expand All @@ -20,8 +29,13 @@ jobs:
- name: Build Go project
run: go build -o ./server ./main.go

deploy:
runs-on: ubuntu-latest
needs: build-and-deploy
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- 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
id: deployment
uses: actions/deploy-pages@v1

0 comments on commit 8910f58

Please sign in to comment.