Skip to content

Commit

Permalink
Workflow QoL improvements (#237)
Browse files Browse the repository at this point in the history
* Fix workflow trigger events
- Renamed legacy deployment file
- Removed on push trigger on legacy deployment
- Added on push trigger on the new deployment trigger

Signed-off-by: RadiatedExodus <[email protected]>

* Have the deploy workflows use the build workflow file instead

---------

Signed-off-by: RadiatedExodus <[email protected]>
  • Loading branch information
RealEthanPlayzDev authored Jan 15, 2025
1 parent 1f11104 commit 4078143
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 55 deletions.
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Build
on:
workflow_dispatch:
workflow_call:
pull_request:
jobs:
build:
Expand Down
31 changes: 0 additions & 31 deletions .github/workflows/deploy(legacy).yml

This file was deleted.

32 changes: 8 additions & 24 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,37 +1,21 @@
name: Build and Deploy
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
with:
fetch-depth: '0'
persist-credentials: false
submodules: 'recursive'
- name: Setup Node
uses: actions/setup-node@v2-beta
with:
node-version: '22'
- name: Build
run: npm install && npm run build
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action
with:
path: docs
name: Build
uses: ./.github/workflows/build.yml
deploy:
environment:
name: Deploy
name: Deploy
runs-on: ubuntu-latest
needs: build
permissions:
contents: read
pages: write
id-token: write
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
Expand Down
17 changes: 17 additions & 0 deletions .github/workflows/deploy_legacy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Build And Deploy (Legacy)
on:
workflow_dispatch:
jobs:
build:
name: Build
uses: ./.github/workflows/build.yml
deploy:
name: Deploy
steps:
- name: Deploy to GitHub Pages (gh-pages branch)
uses: JamesIves/[email protected]
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main'}}
with:
BRANCH: gh-pages
FOLDER: docs
CLEAN: true

0 comments on commit 4078143

Please sign in to comment.