Skip to content

Commit

Permalink
添加 Github Page 部署
Browse files Browse the repository at this point in the history
  • Loading branch information
wherewhere committed May 22, 2024
1 parent 588fddb commit b5f0605
Show file tree
Hide file tree
Showing 5 changed files with 173 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: wherewhere
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: ['afdian.net/@wherewhere']
59 changes: 59 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Bug report
description: Create a report to help us improve
title: "Bug title"
labels: [bug]
body:
- type: textarea
validations:
required: true
attributes:
label: Describe the bug
description: Please enter a short, clear description of the bug.
- type: textarea
validations:
required: true
attributes:
label: Steps to reproduce the bug
description: Please provide any required setup and steps to reproduce the behavior.
placeholder: |
1. Go to '...'
2. Click on '....'
- type: textarea
attributes:
label: Expected behavior
description: Please provide a description of what you expected to happen
- type: textarea
attributes:
label: Screenshots
description: If applicable, add screenshots here to help explain your problem
- type: dropdown
validations:
required: true
attributes:
label: Browser
description: Which browser did you see the issue on?
options:
- "Edge - Edge HTML"
- "Chrome - Chromium"
- "Firefox - Gecko"
- "Safari - Webkit"
- "Opera - Presto"
- "Internet Explorer - Trident"
- "Others"
- type: dropdown
validations:
required: true
attributes:
label: Platform
description: Which platform did you see the issue on?
options:
- "Windows"
- "Android"
- "iOS"
- "Linux"
- "MacOS"
- "Others"
- type: textarea
attributes:
label: Additional context
description: Enter any other applicable info here
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: true
contact_links:
- name: Question
url: https://github.com/wherewhere/wherewhere.github.io/discussions/new?category=q-a
about: Ask a question
- name: Discussion
url: https://github.com/wherewhere/wherewhere.github.io/discussions/new?category=general
about: Start a discussion
33 changes: 33 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Feature request
description: Suggest an idea for this project
title: "Feature title"
labels: [enhancement]
body:
- type: textarea
validations:
required: true
attributes:
label: Describe your feature request
description: A clear and concise description of what the problem is.
placeholder: I'm always frustrated when [...]
- type: dropdown
validations:
required: true
attributes:
label: How important is this to you?
options:
- "Nice-to-have"
- "Important"
- "Critical"
- type: textarea
attributes:
label: Describe the solution you'd like
description: A clear and concise description of what you want to happen.
- type: textarea
attributes:
label: Describe alternatives you've considered
description: A clear and concise description of any alternative solutions or features you've considered.
- type: textarea
attributes:
label: Additional context
description: Add any other context or screenshots about the feature request here.
60 changes: 60 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
name: build and deploy

on:
push:
branches: [main]
workflow_dispatch:

jobs:
build:
runs-on: windows-latest

env:
Solution_Name: ModernSL/ModernSL.csproj

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

# Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v1
with:
msbuild-architecture: x64

# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Restore the application
run: msbuild $env:Solution_Name /t:Restore /p:Configuration=$env:Configuration
env:
Configuration: Release

# Create the app package by building and packaging the Windows Application Packaging project
- name: Create the app package
run: msbuild $env:Solution_Name /p:Configuration=$env:Configuration
env:
Configuration: Release

- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v3
with:
path: ModernSL/Bin/Release

deploy:
needs: build

permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest

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

0 comments on commit b5f0605

Please sign in to comment.