Skip to content

Commit

Permalink
Merge pull request #1596 from brefphp/website-v3
Browse files Browse the repository at this point in the history
Website and docs v3
  • Loading branch information
mnapoli authored Oct 12, 2023
2 parents 1991e74 + 45ec771 commit 9f08a49
Show file tree
Hide file tree
Showing 209 changed files with 14,404 additions and 6,523 deletions.
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ website/ export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.phpcs.xml export-ignore
couscous.yml export-ignore
docker-compose.yml export-ignore
Makefile export-ignore
phpstan.neon export-ignore
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Website

on:
push:
branches: [ 'website-v3' ]

env:
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }}
VERCEL_PROJECT_ID: ${{ secrets.VERCEL_PROJECT_ID }}

jobs:

deploy:
runs-on: ubuntu-latest
permissions:
contents: read
defaults:
run:
working-directory: ./website
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # fetch all history for "latest modified time"
- run: npm install --global vercel@latest
- run: make src/pages/docs
- name: Pull Vercel Environment Information
run: vercel pull --yes --environment=production --token=${{ secrets.VERCEL_TOKEN }}
- name: Build
run: vercel build --prod --token=${{ secrets.VERCEL_TOKEN }}
env:
# CUSTOM_GITHUB_TOKEN_READ is a manually created GitHub token with appropriate permissions:
# - allowed to list contributors
# - allowed to list sponsors
# It wouldn't be possible to use the default GITHUB_TOKEN because it doesn't have the required permissions.
GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN_READ }}
- name: Deploy
run: vercel deploy --prebuilt --prod --token=${{ secrets.VERCEL_TOKEN }}
21 changes: 1 addition & 20 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,6 @@ trigger_runtimes:
runtime_build_status:
aws codepipeline get-pipeline-state --name=bref-php-binary | jq ".stageStates[1].latestExecution.status"

# Generate and deploy the production version of the website using http://couscous.io
website:
# See http://couscous.io/
couscous generate
netlify deploy --prod --dir=.couscous/generated
website-staging:
couscous generate
netlify deploy --dir=.couscous/generated

# Run a local preview of the website using http://couscous.io
website-preview:
couscous preview

website-assets: website/template/output.css
website/template/output.css: website/node_modules website/template/styles.css website/tailwind.config.js
cd website && NODE_ENV=production npx tailwind build template/styles.css -o template/output.css
website/node_modules: website/package.json website/package-lock.json
cd website && npm install

# Deploy the demo functions
demo:
serverless deploy
Expand All @@ -35,4 +16,4 @@ layers.json:
test-stack:
serverless deploy -c tests/serverless.tests.yml

.PHONY: website website-preview website-assets demo layers.json test-stack
.PHONY: demo layers.json test-stack
2 changes: 1 addition & 1 deletion SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Version 1.7.x will only receive critical bug fixes and security fixes, as well P

You are encouraged to upgrade to v2.

If you prefer to stay on v1 and need long term support for v1 (or need help upgrading), get in touch for enterprise support: https://bref.sh/#enterprise
If you prefer to stay on v1 and need long term support for v1 (or need help upgrading), get in touch for enterprise support: https://bref.sh/support

## Reporting a Vulnerability

Expand Down
4 changes: 2 additions & 2 deletions bref
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@ switch ($argv[1] ?? '') {
break;
case 'cli':
cliWarning();
error('Since Bref 2.0, the "bref cli" command has been moved. Read https://bref.sh/docs/runtimes/console.html#usage');
error('Since Bref 2.0, the "bref cli" command has been moved. Read https://bref.sh/docs/runtimes/console#usage');
case 'layers':
cliWarning();
echo "Bref layer ARNs can be found here: https://runtimes.bref.sh/\n\n";
echo "If you are using Serverless Framework, you can also run the 'serverless bref:layers' command.\n";
exit(1);
case 'local':
cliWarning();
error('Since Bref 2.0, the "bref local" command has been moved. Read https://bref.sh/docs/function/local-development.html\n');
error('Since Bref 2.0, the "bref local" command has been moved. Read https://bref.sh/docs/local-development/event-driven-functions\n');
case 'dashboard':
cliWarning();
echo "The Bref Dashboard is now available as a desktop application.\n\n";
Expand Down
172 changes: 0 additions & 172 deletions couscous.yml

This file was deleted.

Loading

0 comments on commit 9f08a49

Please sign in to comment.