-
Notifications
You must be signed in to change notification settings - Fork 164
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
3 changed files
with
164 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,90 @@ | ||
# Build Job to be used between main and pages workflows | ||
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions | ||
|
||
name: Build | ||
|
||
on: | ||
# Reusable Workflow | ||
workflow_call: | ||
inputs: | ||
# Run end to end tests | ||
test: | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
# Upload built files as static artifact | ||
upload: | ||
required: false | ||
type: boolean | ||
default: false | ||
|
||
jobs: | ||
build: | ||
timeout-minutes: 10 | ||
# Match Development Operating System | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Setup | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
# Match Development Node Version | ||
node-version: '20.x' | ||
|
||
# Tool Versions | ||
- name: Node Version | ||
run: node --version | ||
|
||
- name: NPM Version | ||
run: npm --version | ||
|
||
# Package Setup | ||
- name: clean install | ||
run: npm ci | ||
|
||
# 'npm run build' broken into separate steps | ||
# - name: clean | ||
# run: npm run clean | ||
|
||
# - name: style | ||
# run: npm run style-check | ||
|
||
# - name: spell-check | ||
# run: npm run spell-check --if-present | ||
|
||
# - name: lint | ||
# run: npm run lint | ||
|
||
# - name: compile | ||
# run: npm run compile | ||
|
||
- name: build | ||
run: npm run build | ||
|
||
# - name: Upload static files as artifact | ||
# if: inputs.upload | ||
# uses: actions/upload-pages-artifact@v1 | ||
# with: | ||
# path: dist/ | ||
|
||
- name: Upload static files as artifact | ||
if: inputs.upload | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: packages/editor/build/ | ||
## end to end tests | ||
# - name: Install Playwright Browsers | ||
# if: inputs.test | ||
# run: npm run playwright-install | ||
# - name: Run Playwright tests | ||
# if: inputs.test | ||
# run: npm run playwright-test | ||
# - uses: actions/upload-artifact@v3 | ||
# if: inputs.test | ||
# with: | ||
# name: playwright-report | ||
# path: playwright-report/ | ||
# retention-days: 30 |
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,27 @@ | ||
# Main workflow to keep branches clean | ||
|
||
name: Main | ||
|
||
on: | ||
|
||
push: | ||
branches: | ||
# main branch CI | ||
- 'main' | ||
# Any branch | ||
- '*' | ||
|
||
# Run on pull request | ||
pull_request: | ||
types: [ opened, synchronize ] | ||
|
||
# Cancel current workflow if there is already one running | ||
concurrency: | ||
group: ${{ github.workflow }} ${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
test: true |
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,47 @@ | ||
# Publish to GitHub pages | ||
|
||
# https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#creating-a-custom-github-actions-workflow-to-publish-your-site | ||
|
||
name: Pages | ||
|
||
on: | ||
# main branch CI | ||
push: | ||
branches: | ||
- 'main' | ||
|
||
# Manual | ||
workflow_dispatch: | ||
|
||
# Only allow one pages workflow to run at a time | ||
concurrency: | ||
group: ${{ github.workflow }} | ||
|
||
jobs: | ||
|
||
build: | ||
uses: ./.github/workflows/build.yml | ||
with: | ||
upload: true | ||
|
||
# Deploy job | ||
deploy: | ||
# Add a dependency to the build job | ||
needs: build | ||
|
||
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | ||
permissions: | ||
pages: write # to deploy to Pages | ||
id-token: write # to verify the deployment originates from an appropriate source | ||
|
||
# Deploy to the github-pages environment | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |