Deploy v 0.69 (test) #20
Workflow file for this run
This file contains 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: Deploy to Github Pages Test | |
on: | |
push: | |
tags: | |
- 'v*.*.*' | |
permissions: | |
contents: write | |
jobs: | |
build: | |
if: startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-release') | |
concurrency: ci-${{ github.ref }} | |
runs-on: ubuntu-latest | |
env: | |
PROJECT_PATH: "src/Angor/Server/Angor.Server.csproj" | |
OUTPUT_PATH: "Output" | |
BUILD_CONFIGURATION: "Release" | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup .NET Core | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 8.0.x | |
- name: Publish (Angor) | |
run: dotnet publish ${{env.PROJECT_PATH}} -f net8.0 --configuration ${{env.BUILD_CONFIGURATION}} --output ${{env.OUTPUT_PATH}} | |
- name: Copy index.html to 404.html | |
run: cp ${{env.OUTPUT_PATH}}/wwwroot/index.html ${{env.OUTPUT_PATH}}/wwwroot/404.html | |
- name: Add .nojekyll file | |
run: touch ${{env.OUTPUT_PATH}}/wwwroot/.nojekyll | |
- name: Minify and replace JS files | |
run: | | |
npm install uglify-js -g | |
find ${{env.OUTPUT_PATH}}/wwwroot/assets/js -type f -name '*.js' -exec uglifyjs {} -o {} --compress --mangle \; | |
- name: Minify and replace CSS files | |
run: | | |
npm install csso-cli -g | |
find ${{env.OUTPUT_PATH}}/wwwroot/assets/css -type f -name '*.css' -exec csso {} -o {} \; | |
# - name: Deploy to Github Pages | |
# uses: JamesIves/github-pages-deploy-action@v4 | |
# with: | |
# branch: gh-pages | |
# folder: ${{env.OUTPUT_PATH}}/wwwroot | |
- name: Deploy to Github Pages | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: main | |
folder: ${{env.OUTPUT_PATH}}/wwwroot | |
repository-name: block-core/angor-test | |
token: ${{ secrets.ANGOR_DEPLOY_TOKEN }} |