-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
10 changed files
with
238 additions
and
105 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,89 @@ | ||
on: | ||
workflow_call: | ||
inputs: | ||
publish: | ||
default: false | ||
type: boolean | ||
|
||
jobs: | ||
generate-documentation: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: ⚙️ Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.3 | ||
extensions: none, curl, json, dom, tokenizer, xml, xmlwriter, simplexml, iconv, mbstring, intl, sodium | ||
|
||
- name: ♻️ Get composer cache directory | ||
id: composer-cache | ||
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT | ||
|
||
- name: ♻️ Cache composer dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ steps.composer-cache.outputs.dir }} | ||
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: ${{ runner.os }}-composer- | ||
|
||
- name: ⚙️ Install dependencies | ||
run: | | ||
composer install --no-progress --prefer-dist --optimize-autoloader | ||
composer --working-dir=tools install --no-progress --prefer-dist --optimize-autoloader | ||
- name: ♻️ Tools cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: tools/cache | ||
key: ${{ runner.os }}-tools-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-tools- | ||
- name: 📃 Generate documentation | ||
run: composer generate-docs | ||
|
||
- name: 📦 Upload generated documentation artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: documentation | ||
path: website/docs | ||
|
||
build-website: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: documentation | ||
|
||
- uses: actions/[email protected] | ||
with: | ||
node-version-file: ".nvmrc" | ||
cache: yarn | ||
cache-dependency-path: website/yarn.lock | ||
|
||
- name: ⚙️ Install Dependencies | ||
working-directory: website | ||
run: yarn install --frozen-lockfile | ||
|
||
- name: ♻️ Webpack cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: website/node_modules/.cache/webpack | ||
key: ${{ runner.os }}-webpack-${{ github.sha }} | ||
restore-keys: | | ||
${{ runner.os }}-webpack- | ||
- name: 🏗️ Build website | ||
run: yarn build | ||
working-directory: website | ||
|
||
- name: 📦 Upload website build artifact | ||
if: inputs.publish | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
path: website/build |
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 was deleted.
Oops, something went wrong.
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: "Linter" | ||
|
||
on: | ||
push: | ||
branches: [main, 4.x] | ||
tags: ["*"] | ||
|
||
pull_request: | ||
branches: [main, 4.x] | ||
|
||
jobs: | ||
main: | ||
uses: hoverkraft-tech/ci-github-common/.github/workflows/[email protected] |
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,51 @@ | ||
name: Main - Continuous Integration | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
- 4.x | ||
|
||
jobs: | ||
ci: | ||
name: Continuous Integration | ||
uses: ./.github/workflows/__shared-ci.yml | ||
secrets: inherit | ||
with: | ||
publish: true | ||
|
||
deploy: | ||
name: Deploy website | ||
needs: ci | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: documentation | ||
|
||
- uses: stefanzweifel/git-auto-commit-action@v5 | ||
with: | ||
commit_message: "docs: update documentation" | ||
commit_options: "--no-verify --signoff" | ||
|
||
- name: ⚙️ Setup Pages | ||
if: github.ref == 'refs/heads/main' | ||
uses: actions/configure-pages@v4 | ||
|
||
- name: 🚀 Deploy to GitHub Pages | ||
id: deployment | ||
if: github.ref == 'refs/heads/main' | ||
uses: actions/deploy-pages@v3 |
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,21 @@ | ||
name: Need fix to Issue | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
workflow_dispatch: | ||
inputs: | ||
manual-commit-ref: | ||
description: "The SHA of the commit to get the diff for" | ||
required: true | ||
manual-base-ref: | ||
description: "By default, the commit entered above is compared to the one directly before it; to go back further, enter an earlier SHA here" | ||
required: false | ||
|
||
jobs: | ||
main: | ||
uses: hoverkraft-tech/ci-github-common/.github/workflows/[email protected] | ||
with: | ||
manual-commit-ref: ${{ inputs.manual-commit-ref }} | ||
manual-base-ref: ${{ inputs.manual-base-ref }} |
This file was deleted.
Oops, something went wrong.
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,18 @@ | ||
name: Pull request - Continuous Integration | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- 4.x | ||
merge_group: | ||
|
||
jobs: | ||
ci: | ||
name: Continuous Integration | ||
uses: ./.github/workflows/__shared-ci.yml | ||
secrets: inherit |
Oops, something went wrong.