Skip to content

更新 VSCode 配色 #113

更新 VSCode 配色

更新 VSCode 配色 #113

name: build and deploy
on:
push:
branches: [wasm]
pull_request:
branches: [wasm]
workflow_dispatch:
env:
DOTNET_VERSION: 10.0.x # The .NET SDK version to use
jobs:
build:
runs-on: ubuntu-latest
env:
Solution_Name: SharpScript/SharpScript.csproj
steps:
- name: Checkout
uses: actions/checkout@v7
with:
fetch-depth: 0
# Install the .NET Core App workload
- name: Install .NET Core App
uses: actions/setup-dotnet@v5
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Install Node.js
uses: actions/setup-node@v7
with:
node-version: latest
- name: Install WASM Tools Workload
run: dotnet workload install wasm-tools
# Restore the application to populate the obj folder with RuntimeIdentifiers
- name: Install Dependencies
run: dotnet restore ${{ env.Solution_Name }}
- name: Publish
run: dotnet publish ${{ env.Solution_Name }} -c:Release -o:public
# Changes the base-tag in index.html to match GitHub Pages repository subdirectory
- name: Change index.html base-tag
run: sed -i 's/<base href=\/>/<base href=\/SharpScript\/>/g' public/wwwroot/index.html
# Add .nojekyll file to tell GitHub pages to not treat this as a Jekyll project. (Allow files and folders starting with an underscore)
- name: Add .nojekyll file
run: touch public/wwwroot/.nojekyll
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: public/wwwroot
deploy:
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch'
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@v5