-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
31 additions
and
106 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,63 +1,39 @@ | ||
name: deploy-gh-pages | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
# Triggers the workflow on push or pull request events but only for the "main" branch | ||
# Trigger the workflow every time you push to the `main` branch | ||
# Using a different branch name? Replace `main` with your branch’s name | ||
push: | ||
branches: [ "main" ] | ||
|
||
# triggers when "update-dependencies" is completed | ||
workflow_run: | ||
workflows: [update-dependencies] | ||
types: [completed] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
branches: [ main ] | ||
# Allows you to run this workflow manually from the Actions tab on GitHub. | ||
workflow_dispatch: | ||
|
||
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | ||
# Allow this job to clone the repo and create a page deployment | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
jobs: | ||
# This workflow contains a single job called "build" | ||
build-and-deploy: | ||
# The type of runner that the job will run on | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup .NET 3.1 | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 3.1.301 | ||
|
||
- name: Setup .NET 5 | ||
uses: actions/setup-dotnet@v3 | ||
with: | ||
dotnet-version: 5.0.102 | ||
|
||
- name: Setup node & sass | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '16' | ||
|
||
- name: install sass | ||
run: npm install -g sass | ||
|
||
- name: install node modules | ||
run: npm install | ||
|
||
- name: Restore dotnet tools | ||
run: dotnet tool restore | ||
|
||
- name: Build | ||
working-directory: ./src | ||
run: dotnet fornax build | ||
|
||
- name: deploy | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages # The branch the action should deploy to. | ||
FOLDER: ./src/_public # The folder the action should deploy. | ||
CLEAN: true # Automatically remove deleted files from the deploy branch | ||
- name: Checkout your repository using git | ||
uses: actions/checkout@v4 | ||
- name: Install, build, and upload your site | ||
uses: withastro/action@v3 | ||
# with: | ||
# path: . # The root location of your Astro project inside the repository. (optional) | ||
# node-version: 20 # The specific version of Node that should be used to build your site. Defaults to 20. (optional) | ||
# package-manager: pnpm@latest # The Node package manager that should be used to install dependencies and build your site. Automatically detected based on your lockfile. (optional) | ||
|
||
deploy: | ||
needs: build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file was deleted.
Oops, something went wrong.