Skip to content

Deployment

Deployment #122

---
name: Deployment
on:
schedule:
- cron: '0 0 * * *'
push:
branches:
- main
workflow_dispatch: null
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Setup .Net
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
- name: Setup Publishing
run: |
mkdir publish
cp -R src/web/ publish/
- name: Restore dependencies
run: |
cd src
dotnet restore
- name: Build and Run
run: >
cd src
dotnet build -c Release --no-restore
dotnet run -c Release --project LastChristmas.Transform $GITHUB_WORKSPACE/publish --md --html
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: 'publish'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2