Skip to content

Commit

Permalink
Fixed links in website (#963)
Browse files Browse the repository at this point in the history
* Fixed links in website

* Remove useless twig extension

* Fix domain in local dev environment

* Extracted website tests to separate workflow
  • Loading branch information
norberttech authored Feb 4, 2024
1 parent bc870b5 commit 0581a3d
Show file tree
Hide file tree
Showing 14 changed files with 329 additions and 114 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/publish-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ jobs:

- name: "Build"
run: "composer build"
env:
DOMAIN: flow-php.com
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
working-directory: "web/landing"

- name: Pushes build to website repository
Expand Down
50 changes: 1 addition & 49 deletions .github/workflows/test-suite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ on:
- 'src/adapter/**'
- 'src/core/**'
- 'src/lib/**'
- 'web/**'
- 'tools/**'
- 'composer.lock'
push:
Expand Down Expand Up @@ -215,51 +214,4 @@ jobs:
FLOW_LOCAL_FILESYSTEM_CACHE_DIR: "./var/cache/${{ matrix.php-version }}-${{ matrix.dependencies }}"

- name: "Run Examples"
run: "php examples/run.php"

website-tests:
name: "Website Tests"

runs-on: ${{ matrix.operating-system }}

strategy:
fail-fast: false
matrix:
php-version:
- "8.1"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v4"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: pcov
tools: composer:v2
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
extensions: :psr

- 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: "php-${{ matrix.php-version }}-composer-website-${{ hashFiles('web/landing/composer.lock') }}"
restore-keys: |
php-${{ matrix.php-version }}-composer-website-
- name: "Install dependencies"
run: "composer install --no-interaction --no-progress --no-suggest"
working-directory: "web/landing"

- name: "Test"
run: "composer test"
working-directory: "web/landing"
run: "php examples/run.php"
63 changes: 63 additions & 0 deletions .github/workflows/test-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Test Website

on:
pull_request:
paths:
- '.github/workflows/**'
- 'web/**'

push:
branches: [ 1.x ]

# See https://stackoverflow.com/a/72408109
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
website-tests:
name: "Website Tests"

runs-on: ${{ matrix.operating-system }}

strategy:
fail-fast: false
matrix:
php-version:
- "8.1"
operating-system:
- "ubuntu-latest"

steps:
- name: "Checkout"
uses: "actions/checkout@v4"

- name: "Install PHP"
uses: "shivammathur/setup-php@v2"
with:
coverage: pcov
tools: composer:v2
php-version: "${{ matrix.php-version }}"
ini-values: memory_limit=-1
extensions: :psr

- 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: "php-${{ matrix.php-version }}-composer-website-${{ hashFiles('web/landing/composer.lock') }}"
restore-keys: |
php-${{ matrix.php-version }}-composer-website-
- name: "Install dependencies"
run: "composer install --no-interaction --no-progress --no-suggest"
working-directory: "web/landing"

- name: "Test"
run: "composer test"
working-directory: "web/landing"
1 change: 1 addition & 0 deletions web/landing/.env
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
APP_ENV=dev
APP_SECRET=04f48bdb7d5426b4c5ba6aaf3d00a1fa
DOMAIN='flow-php.wip'
GITHUB_TOKEN=changeme
1 change: 1 addition & 0 deletions web/landing/.gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
.env.local
/.env.*.local
build/
vendor/
var/
Expand Down
4 changes: 4 additions & 0 deletions web/landing/assets/images/icons/github.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
14 changes: 10 additions & 4 deletions web/landing/composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
"symfony/dotenv": "^6.4",
"symfony/stimulus-bundle": "^2.14",
"monolog/monolog": "^3.5",
"symfony/monolog-bundle": "^3.10"
"symfony/monolog-bundle": "^3.10",
"coduo/php-humanizer": "^4.0"
},
"require-dev": {
"symfony/web-profiler-bundle": "^6.4",
Expand Down Expand Up @@ -73,9 +74,14 @@
"bin/console tailwind:build"
],
"build": [
"@build:assets",
"bin/console static-content-generator:generate:routes --clean",
"bin/console static-content-generator:copy:assets -d public"
"rm -rf public/assets",
"rm -rf build",
"APP_ENV=prod bin/console cache:clear",
"APP_ENV=prod bin/console importmap:install",
"APP_ENV=prod bin/console asset-map:compile",
"APP_ENV=prod bin/console tailwind:build --minify",
"APP_ENV=prod bin/console static-content-generator:generate:routes --clean",
"APP_ENV=prod bin/console static-content-generator:copy:assets -d public"
]
}
}
Loading

0 comments on commit 0581a3d

Please sign in to comment.