Skip to content

Commit

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

on:
# 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
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write
contents: read
pages: write
id-token: write

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

steps:
Expand All @@ -29,13 +25,26 @@ jobs:
- name: Build Go project
run: go build -o ./server ./main.go

- name: Upload server artifact
uses: actions/upload-artifact@v2
with:
name: server
path: ./server

deploy:
runs-on: ubuntu-latest
needs: build-and-deploy
needs: build
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Download server artifact
uses: actions/download-artifact@v2
with:
name: server
path: ./server

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
uses: actions/deploy-pages@v1

0 comments on commit f2e8fe8

Please sign in to comment.