-
Notifications
You must be signed in to change notification settings - Fork 28
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
0 parents
commit c7de005
Showing
1,650 changed files
with
31,456 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,3 @@ | ||
[default] | ||
region = us-east-1 | ||
output = json |
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,29 @@ | ||
on: | ||
pull_request: | ||
|
||
env: | ||
NODE_VERSION: "20.x" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
test-build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: "0" | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: "npm" | ||
|
||
- name: Build to make sure data is OK | ||
run: | | ||
# Set up yarn | ||
yarn install | ||
# Build | ||
yarn build:public |
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,72 @@ | ||
on: | ||
push: | ||
branches: ["main", "staging"] | ||
workflow_dispatch: | ||
|
||
# Cancel in-progress jobs or runs for the current workflow | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
NODE_VERSION: "20.x" | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
pre-build: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
env_name: ${{ steps.set_env.outputs.env_name }} | ||
steps: | ||
- name: Set environment name | ||
id: set_env | ||
run: | | ||
if [[ "${{ github.ref_name }}" == "staging" ]]; then | ||
echo "env_name=Development" >> $GITHUB_OUTPUT | ||
fi | ||
build: | ||
needs: [pre-build] | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: ${{ needs.pre-build.outputs.env_name }} | ||
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
fetch-depth: "0" | ||
|
||
- name: Set up Node.js | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ env.NODE_VERSION }} | ||
cache: "npm" | ||
|
||
- name: Build and deploy | ||
run: | | ||
# Set up the environment variables | ||
export NODE_OPTIONS=--experimental-wasm-modules | ||
export AUTH_SECRET=${{ secrets.AUTH_SECRET }} | ||
export AUTH0_CLIENT_ID=${{ secrets.AUTH0_CLIENT_ID }} | ||
export AUTH0_CLIENT_SECRET=${{ secrets.AUTH0_CLIENT_SECRET }} | ||
export AUTH_TRUST_HOST=${{ vars.AUTH_TRUST_HOST }} | ||
export AUTH0_ISSUER_BASE=${{ vars.AUTH0_ISSUER_BASE }} | ||
export AUTH_API_URL=${{ vars.AUTH_API_URL }} | ||
export SPIRE_WEBSITES_ID=${{ vars.SPIRE_WEBSITES_ID }} | ||
export PUBLIC_KEY_URL=${{ vars.PUBLIC_KEY_URL }} | ||
export CUSTOM_DOMAIN=${{ vars.CUSTOM_DOMAIN }} | ||
# Set up yarn | ||
yarn install | ||
# Set up AWS CLI & credentials | ||
sudo apt update && sudo apt upgrade -y && sudo apt install -y pipx | ||
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" | ||
unzip awscliv2.zip | ||
sudo ./aws/install --update | ||
cp -R .aws ~/ | ||
pipx run pipenv install | ||
$(pipx run pipenv run python ./get_aws_creds.py -i ${{ secrets.VAULT_ROLE_ID }} -s ${{ secrets.VAULT_SECRET_ID }} -r ${{ secrets.VAULT_ROLE }}) | ||
# Build & deploy | ||
if [[ "${{ github.ref_name }}" == "staging" ]]; then | ||
export STAGE="dev" | ||
fi | ||
yarn sst deploy --stage $STAGE |
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,29 @@ | ||
# build output | ||
dist/ | ||
dist_pagefind/ | ||
dist_prebuild/ | ||
|
||
# generated types | ||
.astro/ | ||
cache/ | ||
|
||
# dependencies | ||
node_modules/ | ||
.yarn/ | ||
|
||
# logs | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
pnpm-debug.log* | ||
|
||
|
||
# environment variables | ||
.env | ||
.env.* | ||
|
||
# macOS-specific files | ||
.DS_Store | ||
|
||
# sst | ||
.sst |
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 @@ | ||
ignore-scripts=false |
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,4 @@ | ||
{ | ||
"recommendations": ["astro-build.astro-vscode"], | ||
"unwantedRecommendations": [] | ||
} |
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,11 @@ | ||
{ | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"command": "./node_modules/.bin/astro dev", | ||
"name": "Development server", | ||
"request": "launch", | ||
"type": "node-terminal" | ||
} | ||
] | ||
} |
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,10 @@ | ||
.github/workflows @pcolmer @louismorgan-linaro @DelaraGi | ||
CODEOWNERS @pcolmer @louismorgan-linaro @DelaraGi | ||
.gitignore @pcolmer @louismorgan-linaro @DelaraGi | ||
package.json @pcolmer @louismorgan-linaro @DelaraGi | ||
src/components @pcolmer @louismorgan-linaro @DelaraGi | ||
src/layouts @pcolmer @louismorgan-linaro @DelaraGi | ||
src/pages @pcolmer @louismorgan-linaro @DelaraGi | ||
src/styles @pcolmer @louismorgan-linaro @DelaraGi | ||
src/util @pcolmer @louismorgan-linaro @DelaraGi | ||
src/content/config.ts @pcolmer @louismorgan-linaro @DelaraGi |
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,12 @@ | ||
[[source]] | ||
url = "https://pypi.org/simple" | ||
verify_ssl = true | ||
name = "pypi" | ||
|
||
[packages] | ||
requests = "*" | ||
|
||
[dev-packages] | ||
|
||
[requires] | ||
python_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,30 @@ | ||
# "Works on Windows on Arm" website git repository | ||
|
||
This repository is used to build `staging.worksonwoa.com` and, from there, `www.worksonwoa.com`. | ||
|
||
The websites are built automatically when the staging and main branches are updated, as appropriate. | ||
|
||
The staging branch is updated by: | ||
|
||
- Forking this repository | ||
- Making the changes you want to make | ||
- Raising a pull request against the staging branch | ||
- Waiting for a repository maintainer to review and approve your changes | ||
|
||
Once the pull request is approved, your changes will be merged to the staging branch and published to staging.worksonwoa.com. | ||
|
||
A repository maintainer can then merge all changes from staging to main in order to cause the main website to be updated and rebuilt. | ||
|
||
## Contributing | ||
|
||
Details of the schemas used in the game and user report files can be found by reading https://www.worksonwoa.com/contributing | ||
|
||
## Questions? | ||
|
||
If you have any questions about updating or building this website, please contact Linaro IT Support at [[email protected]](mailto:[email protected]). | ||
|
||
## Developer Info | ||
|
||
Running the site locally will require `Node.js` and the `yarn` package manager. | ||
|
||
Install dependencies with `yarn install` then, to run the site locally, run `yarn start:build`. Press CTRL+C to stop the local web server when you have finished. |
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,68 @@ | ||
import { defineConfig } from "astro/config"; | ||
import aws from "astro-sst"; | ||
import sitemap from "@astrojs/sitemap"; | ||
import tailwind from "@astrojs/tailwind"; | ||
import solidJs from "@astrojs/solid-js"; | ||
import pagefind from "./integrations/pagefind"; | ||
import auth from "./integrations/auth"; | ||
import { loadEnv } from "vite"; | ||
|
||
|
||
const { IS_PUBLIC, PRE_BUILD, CUSTOM_DOMAIN } = loadEnv( | ||
process.env.NODE_ENV, | ||
process.cwd(), | ||
"" | ||
); | ||
const is_public = IS_PUBLIC === "true" | ||
const is_pre_build = PRE_BUILD === "true" | ||
|
||
// https://astro.build/config | ||
export default defineConfig({ | ||
...(is_public | ||
? { | ||
output: "static", | ||
integrations: [ | ||
sitemap(), | ||
pagefind({ | ||
is_pre_build: is_pre_build, | ||
is_public: is_public, | ||
}), | ||
tailwind({ | ||
applyBaseStyles: false, | ||
}), | ||
solidJs(), | ||
], | ||
} | ||
: { | ||
output: PRE_BUILD ? "hybrid" : "server", | ||
adapter: aws({ | ||
serverRoutes: ["/api/*"], | ||
}), | ||
integrations: [ | ||
sitemap(), | ||
pagefind({ | ||
is_pre_build: is_pre_build, | ||
is_public: is_public, | ||
}), | ||
tailwind({ | ||
applyBaseStyles: false, | ||
}), | ||
solidJs(), | ||
auth({ | ||
injectEndpoints: true, | ||
}), | ||
], | ||
}), | ||
site: `https://${CUSTOM_DOMAIN}`, | ||
cacheDir: "./cache", | ||
compressHTML: true, | ||
build: { | ||
rollupOptions: { | ||
external: ["/pagefind/pagefind.js"], | ||
}, | ||
redirects: false, | ||
}, | ||
vite: { | ||
optimizeDeps: { exclude: ['auth:config'] }, | ||
} | ||
}); |
Oops, something went wrong.