Skip to content

Commit

Permalink
Merge pull request #4 from CompositionalIT/deploy-pages
Browse files Browse the repository at this point in the history
alter way demo is deployed in pages
  • Loading branch information
martinbryant authored Mar 7, 2024
2 parents 27c13a2 + ea02af2 commit b2f924a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 17 deletions.
31 changes: 17 additions & 14 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,45 +6,48 @@ on:

jobs:
build:

runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Check out
uses: actions/checkout@v4

- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x

- name: Restore tools
run: dotnet tool restore
# Build and Pack need to be seperate operations due to error NU5026

# Build and Pack need to be separate operations due to error NU5026
- name: Build
run: dotnet build --configuration Release

- name: Pack
run: dotnet pack --no-build -p:PackageVersion=${{ github.ref_name }} -p:PackageReleaseNotes=${{ github.event.release.html_url }} --output .
working-directory: ./src/Feliz.ReactSpeedometer

- name: Publish
run: dotnet nuget push "*.nupkg" --api-key ${{secrets.NUGET_API_KEY}} --source https://api.nuget.org/v3/index.json
working-directory: ./src/Feliz.ReactSpeedometer

- name: Setup node
uses: actions/setup-node@v4
with:
node-version: 20

- name: Restore demo tools
run: dotnet tool restore
working-directory: ./demo

- name: Set git user
uses: fregante/setup-git-user@v2

- name: Deploy Demo
run: npm run publish-docs
- name: Build Demo
run: npm run build
working-directory: ./demo

- name: Deploy pages 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
folder: dist
4 changes: 1 addition & 3 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,11 @@
"prestart": "dotnet fable clean --yes && npm install",
"start": "dotnet fable watch -s -o ./output --run npx vite",
"prebuild": "dotnet fable clean --yes && npm install",
"build": "dotnet fable -s -o ./output --run npx vite build",
"publish-docs": "npm run build && node publish.js"
"build": "dotnet fable -s -o ./output --run npx vite build"
},
"dependencies": {
"bulma": "^0.9.1",
"date-fns": "^2.16.1",
"gh-pages": "^3.1.0",
"react-d3-speedometer": "^2.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0"
Expand Down

0 comments on commit b2f924a

Please sign in to comment.