-
-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add new Publish site * Reorganise code * Rename stuff * Point images URLs to design repo * Add images and update CI * Update Package and add README * Add dynamic repo stars counter * Attempt at fixing CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Fix CI * Add coming soon page for showcase and team * Remove local version of design repo * FOrmat stars count on main page * Address most requested changes * Fix comp error * Add showcase elements * Update showcase link * Nits
- Loading branch information
Showing
85 changed files
with
1,036 additions
and
12,576 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,54 @@ | ||
name: Build and deploy vapor.codes | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Build and deploy | ||
runs-on: ubuntu-latest | ||
container: swift:5.10-jammy | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Build site | ||
run: swift run | ||
- name: Configure AWS credentials | ||
id: cred | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
with: | ||
aws-access-key-id: ${{ secrets.SITE_DEPLOYER_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.SITE_DEPLOYER_ACCESS_KEY_SECRET }} | ||
aws-region: "eu-west-2" | ||
- name: Deploy to AWS Cloudformation | ||
id: clouddeploy | ||
uses: aws-actions/aws-cloudformation-github-deploy@v1 | ||
with: | ||
name: vapor-main-site-stack | ||
template: stack.yml | ||
no-fail-on-empty-changeset: "1" | ||
parameter-overrides: >- | ||
DomainName=vapor.codes, | ||
S3BucketName=vapor-main-site, | ||
AcmCertificateArn=${{ secrets.CERTIFICATE_ARN }} | ||
- name: Deploy to S3 | ||
id: s3deploy | ||
uses: jakejarvis/s3-sync-action@master | ||
with: | ||
args: --acl public-read --follow-symlinks --delete --exclude 'feed.rss' | ||
env: | ||
AWS_S3_BUCKET: "vapor-main-site" | ||
AWS_ACCESS_KEY_ID: ${{ secrets.SITE_DEPLOYER_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.SITE_DEPLOYER_ACCESS_KEY_SECRET }} | ||
AWS_REGION: "eu-west-2" | ||
SOURCE_DIR: "dist" | ||
- name: Invalidate CloudFront | ||
uses: awact/cloudfront-action@master | ||
env: | ||
SOURCE_PATH: "/*" | ||
AWS_REGION: "eu-west-2" | ||
AWS_ACCESS_KEY_ID: ${{ secrets.SITE_DEPLOYER_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.SITE_DEPLOYER_ACCESS_KEY_SECRET }} | ||
DISTRIBUTION_ID: ${{ secrets.DISTRIBUTION_ID }} |
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,23 @@ | ||
name: PR - Closed | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
types: [closed] | ||
|
||
jobs: | ||
delete-s3: | ||
name: Delete S3 Website | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event.pull_request.head.repo.full_name == 'vapor/website' && github.actor != 'dependabot[bot]' }} | ||
env: | ||
AWS_ACCESS_KEY_ID: ${{ secrets.SITE_DEPLOYER_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.SITE_DEPLOYER_ACCESS_KEY_SECRET }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
steps: | ||
- name: Delete Website Bucket | ||
uses: rishabhrao/s3-website-https-pr-action@v1 | ||
with: | ||
bucket-prefix: "vapor-website-pulls" |
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,56 @@ | ||
name: PR | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
build: | ||
name: Build and Deploy PR | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Configure AWS Credentials | ||
uses: aws-actions/configure-aws-credentials@v4 | ||
if: ${{ github.event.pull_request.head.repo.full_name == 'vapor/website' && github.actor != 'dependabot[bot]' }} | ||
with: | ||
aws-access-key-id: ${{ secrets.SITE_DEPLOYER_ACCESS_KEY_ID }} | ||
aws-secret-access-key: ${{ secrets.SITE_DEPLOYER_ACCESS_KEY_SECRET }} | ||
aws-region: eu-west-2 | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
- name: Set up Python | ||
uses: actions/setup-python@v5 | ||
with: | ||
python-version: "3.10" | ||
- name: Setup CloudFormation linter | ||
uses: ScottBrenner/cfn-lint-action@v2 | ||
- name: Run CloudFormation linter | ||
run: cfn-lint -t stack.yml | ||
- name: Build site | ||
run: swift run | ||
- name: Create S3 Bucket | ||
if: ${{ github.event.pull_request.head.repo.full_name == 'vapor/website' && github.actor != 'dependabot[bot]' }} | ||
env: | ||
BUCKET: ${{ format('vapor-website-pulls-pr{0}', github.event.number) }} | ||
run: | | ||
if aws s3api head-bucket --bucket ${BUCKET} 2>/dev/null; then | ||
echo "Bucket already exists" | ||
else | ||
aws s3 mb s3://${BUCKET} | ||
aws s3api delete-public-access-block --bucket ${BUCKET} | ||
aws s3api delete-bucket-ownership-controls --bucket ${BUCKET} | ||
aws s3api put-bucket-website --bucket ${BUCKET} \ | ||
--website-configuration '{"IndexDocument":{"Suffix":"index.html"},"ErrorDocument":{"Key":"404.html"}}' | ||
fi | ||
- name: Deploy S3 Website | ||
if: ${{ github.event.pull_request.head.repo.full_name == 'vapor/website' && github.actor != 'dependabot[bot]' }} | ||
uses: brokenhandsio/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
bucket-prefix: "vapor-website-pulls" | ||
folder-to-copy: "./Output" | ||
bucket-region: "eu-west-2" |
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 |
---|---|---|
@@ -1,11 +1,8 @@ | ||
.DS_Store | ||
node_modules/ | ||
npm-debug.log | ||
yarn-error.log | ||
|
||
# Editor directories and files | ||
.idea | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
/build | ||
/.build | ||
/.swiftpm | ||
/*.xcodeproj | ||
.publish | ||
Output | ||
.vscode |
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,87 @@ | ||
{ | ||
"originHash" : "d34a1b57cfb5f0add1aad56e35c5d2957987cfc8e12013efaaa04ba86aa7cbfd", | ||
"pins" : [ | ||
{ | ||
"identity" : "codextended", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/johnsundell/codextended.git", | ||
"state" : { | ||
"revision" : "8d7c46dfc9c55240870cf5561d6cefa41e3d7105", | ||
"version" : "0.3.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "collectionconcurrencykit", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/johnsundell/collectionConcurrencyKit.git", | ||
"state" : { | ||
"revision" : "b4f23e24b5a1bff301efc5e70871083ca029ff95", | ||
"version" : "0.2.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "design", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/vapor/design.git", | ||
"state" : { | ||
"branch" : "main", | ||
"revision" : "61ca068b15e9f337b0f3b1931fa11d6c07b20084" | ||
} | ||
}, | ||
{ | ||
"identity" : "files", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/johnsundell/files.git", | ||
"state" : { | ||
"revision" : "d273b5b7025d386feef79ef6bad7de762e106eaf", | ||
"version" : "4.2.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "ink", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/johnsundell/ink.git", | ||
"state" : { | ||
"revision" : "bcc9f219900a62c4210e6db726035d7f03ae757b", | ||
"version" : "0.6.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "plot", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/johnsundell/plot.git", | ||
"state" : { | ||
"revision" : "271926b4413fe868739d99f5eadcf2bd6cd62fb8", | ||
"version" : "0.14.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "publish", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/johnsundell/publish.git", | ||
"state" : { | ||
"branch" : "master", | ||
"revision" : "58e943047882a5a6d8135ae2711be8ba7fba57c4" | ||
} | ||
}, | ||
{ | ||
"identity" : "shellout", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/johnsundell/shellout.git", | ||
"state" : { | ||
"revision" : "e1577acf2b6e90086d01a6d5e2b8efdaae033568", | ||
"version" : "2.3.0" | ||
} | ||
}, | ||
{ | ||
"identity" : "sweep", | ||
"kind" : "remoteSourceControl", | ||
"location" : "https://github.com/johnsundell/sweep.git", | ||
"state" : { | ||
"revision" : "801c2878e4c6c5baf32fe132e1f3f3af6f9fd1b0", | ||
"version" : "0.4.0" | ||
} | ||
} | ||
], | ||
"version" : 3 | ||
} |
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 @@ | ||
// swift-tools-version:5.10 | ||
|
||
import PackageDescription | ||
|
||
let package = Package( | ||
name: "Website", | ||
platforms: [.macOS(.v13)], | ||
products: [ | ||
.executable( | ||
name: "Website", | ||
targets: ["Website"] | ||
), | ||
], | ||
dependencies: [ | ||
.package(url: "https://github.com/johnsundell/publish.git", branch: "master"), | ||
.package(url: "https://github.com/vapor/design.git", branch: "main"), | ||
], | ||
targets: [ | ||
.executableTarget( | ||
name: "Website", | ||
dependencies: [ | ||
.product(name: "Publish", package: "Publish"), | ||
.product(name: "VaporDesign", package: "design"), | ||
] | ||
), | ||
] | ||
) |
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 |
---|---|---|
@@ -1,19 +1,17 @@ | ||
# vapor-website | ||
# Vapor Website | ||
|
||
## Project setup | ||
``` | ||
npm install | ||
``` | ||
This repository contains the code for the Vapor website at [vapor.codes](https://vapor.codes). The website is built using [Publish](https://github.com/johnsundell/publish). | ||
|
||
### Compiles and hot-reloads for development | ||
``` | ||
npm run serve | ||
To run the website locally, install the Publish CLI tool using | ||
```bash | ||
git clone https://github.com/JohnSundell/Publish.git | ||
cd Publish | ||
make | ||
``` | ||
|
||
### Compiles and minifies for production | ||
``` | ||
npm run build | ||
then, clone this repository and run the following command: | ||
|
||
```bash | ||
publish run | ||
``` | ||
|
||
### Customize configuration | ||
See [Configuration Reference](https://cli.vuejs.org/config/). |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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 @@ | ||
window.onscroll = function () { | ||
const navbar = document.querySelector(".navbar"); | ||
|
||
if (navbar === null) { | ||
return; | ||
} | ||
|
||
if (document.body.scrollTop > 600 || document.documentElement.scrollTop > 600) { | ||
navbar.style.top = "0"; | ||
} else { | ||
navbar.style.top = "-80px"; | ||
} | ||
} |
Oops, something went wrong.