-
Notifications
You must be signed in to change notification settings - Fork 31
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update deployment workflow to include build and deploy steps (#40)
* chore: Update deployment workflow to include build and deploy steps * chore: Update deployment workflow to include build and deploy steps * chore: Remove unnecessary required flag in workflow inputs * chore: Refactor deployment workflows to remove unnecessary install step * chore: Update node version to 20 and cache yarn in build workflow * chore: Add success step to pull_request workflow This commit adds a new step called "success" to the pull_request workflow. This step runs on the ubuntu-latest runner and is triggered after the "build" step. The purpose of this step is to echo a success message and output a variable called "success" with the value "true". This step is designed to trigger auto merge if all dependencies are met.
- Loading branch information
Showing
5 changed files
with
139 additions
and
198 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
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 |
---|---|---|
@@ -0,0 +1,70 @@ | ||
name: "🚀 Deploy" | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
skipDeploy: | ||
description: "Skip deployment?" | ||
required: true | ||
type: boolean | ||
default: false | ||
workflow_call: | ||
inputs: | ||
skipDeploy: | ||
description: "Skip deployment?" | ||
type: boolean | ||
default: false | ||
|
||
concurrency: "deploy" | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
testOnly: true | ||
|
||
artifacts: | ||
runs-on: ubuntu-latest | ||
needs: [ build ] | ||
steps: | ||
- name: "📥 Checkout code" | ||
uses: actions/checkout@v4 | ||
|
||
- name: "🔧 Setup Node" | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: "20" | ||
cache: "yarn" | ||
|
||
- name: "💽 Restore node_modules cache" | ||
uses: reactgular/cache@v1 | ||
with: | ||
mode: "restore" | ||
|
||
- name: "🔧 Setup Pages" | ||
uses: actions/configure-pages@v5 | ||
with: | ||
static_site_generator: next | ||
|
||
- name: "🔨 Build" | ||
run: yarn build | ||
|
||
- name: "📦 Upload artifact" | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: ./out | ||
|
||
deploy: | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: [ artifacts ] | ||
if: ${{ github.event.inputs.skipDeploy == false }} | ||
steps: | ||
- name: "🚀 Deploy to GitHub Pages" | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
name: "🚀 Main" | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
|
||
concurrency: "main" | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml |
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
Oops, something went wrong.