Skip to content

Commit

Permalink
Setup GitHub pages (#3)
Browse files Browse the repository at this point in the history
* Publish docs folder

* Remove unnecessary pull request template
  • Loading branch information
MarcWils authored May 9, 2024
1 parent af71af8 commit 8be1d23
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 41 deletions.
18 changes: 0 additions & 18 deletions .github/pull_request_template.md

This file was deleted.

30 changes: 7 additions & 23 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@

name: Deploy GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["main"]

pull_request:
branches:
- main

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

Expand All @@ -26,32 +21,21 @@ concurrency:
cancel-in-progress: false

jobs:
# Build job
build:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Publish
if: github.ref == 'refs/heads/main'
run: dotnet publish src/Zippy.Site/Zippy.Site.csproj -c Release -o website
- name: Upload Pages Artifact
if: github.ref == 'refs/heads/main'
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: website/wwwroot/

# Deployment job
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
steps:
path: './docs/'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 8be1d23

Please sign in to comment.