Allow search term to be passed in via url #53
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Spore Mod Browser and deploy to GitHub Pages | |
| env: | |
| PUBLISH_PATH: SporeCommunity.ModBrowser.Blazor/bin/Release/net9.0/publish/wwwroot | |
| on: | |
| push: | |
| branches: [ main ] | |
| pull_request: | |
| branches: [ main ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/cache@v4 | |
| with: | |
| path: ~/.nuget/packages | |
| key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} | |
| restore-keys: | | |
| ${{ runner.os }}-nuget- | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.0' | |
| - name: Publish with .NET | |
| run: dotnet publish -c Release -p:BlazorEnableCompression=false | |
| working-directory: ./SporeCommunity.ModBrowser.Blazor | |
| - name: Add 404 redirect file | |
| run: wget -P ${{ env.PUBLISH_PATH }} "https://raw.githubusercontent.com/rafgraph/spa-github-pages/gh-pages/404.html" | |
| - name: Add readme file | |
| run: wget -P ${{ env.PUBLISH_PATH }} "https://gist.githubusercontent.com/Kade-N/b2dece4553f9900090fe3ce271d73048/raw/README.md" | |
| # - name: Rewrite base href | |
| # uses: SteveSandersonMS/ghaction-rewrite-base-href@v1 | |
| # with: | |
| # html_path: ${{ env.PUBLISH_PATH }}/index.html | |
| # base_href: /ModBrowser/ | |
| - name: Configure URL | |
| run: echo "mods.sporecommunity.com" > ${{ env.PUBLISH_PATH }}/CNAME | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ${{ env.PUBLISH_PATH }} |