Skip to content

Commit

Permalink
update deploy action
Browse files Browse the repository at this point in the history
  • Loading branch information
kMutagene committed Oct 10, 2024
1 parent 24531a7 commit bfb73d8
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 106 deletions.
86 changes: 31 additions & 55 deletions .github/workflows/deploy.yml
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
51 changes: 0 additions & 51 deletions .github/workflows/update-dependencies.yml

This file was deleted.

0 comments on commit bfb73d8

Please sign in to comment.