Skip to content

Deploy to a Github Pages #25

Deploy to a Github Pages

Deploy to a Github Pages #25

name: Continious Integration
on:
push:
branches:
- master
pull_request:
branches:
- master
defaults:
run:
shell: bash
# Set permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
build:
name: "Build"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: Setup Pages
if: github.ref == "refs/heads/master"

Check failure on line 37 in .github/workflows/continuous-integration.yml

View workflow run for this annotation

GitHub Actions / Continious Integration

Invalid workflow file

The workflow is not valid. .github/workflows/continuous-integration.yml (Line: 37, Col: 11): Unexpected symbol: '"refs/heads/master"'. Located at position 15 within expression: github.ref == "refs/heads/master" .github/workflows/continuous-integration.yml (Line: 75, Col: 11): Unexpected symbol: '"refs/heads/master"'. Located at position 15 within expression: github.ref == "refs/heads/master"
uses: actions/configure-pages@v3
- name: Setup .NET 7 SDK
uses: actions/setup-dotnet@v1
with:
dotnet-version: 7.0.x
- name: Install wasm-tools workload
run: |
dotnet workload install wasm-tools
- name: Setup Verlite
run: |
verlite_version="$(grep '"Verlite\.MsBuild"' src/WebGL.Sample/WebGL.Sample.csproj | LC_ALL=en_US.utf8 grep -Po 'Version="\K[^"]+')"
dotnet tool install --global Verlite.CLI --version "$verlite_version"
verlite . --auto-fetch --verbosity verbatim
- name: Publish
run: |
dotnet publish --configuration Release -p:OutputPath="$(pwd)/build"
mv build/AppBundle artifacts
- name: Fix permissions
run: |
chmod -c -R +rX "artifacts/" | while read line; do
echo "::warning title=Invalid file permissions automatically fixed::$line"
done
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
name: artifacts
path: |
artifacts/*
- name: Upload Pages Artifacts
uses: actions/upload-pages-artifact@v2
if: github.ref == "refs/heads/master"
with:
path: "artifacts"
# Deployment job
deploy:
name: "Deploy"
if: github.ref == "refs/heads/master"
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2