Switch over to WebAssembly, Rust and Yew #35

Merged
BlakeRain merged 87 commits from yew-static into main 2023-08-30 18:01:40 +00:00
Showing only changes of commit 64337b05de - Show all commits

View File

@ -14,24 +14,35 @@ jobs:
uses: actions/checkout@v2 uses: actions/checkout@v2
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Setup Node - name: Setup Node
uses: actions/setup-node@v2 uses: actions/setup-node@v2
with: with:
node-version: 16 node-version: 18
- name: Configure Cache - name: Configure Cache
uses: actions/cache@v2 uses: actions/cache@v2
with: with:
path: | path: |
${{ github.workspace }}/node_modules ${{ github.workspace }}/node_modules
${{ github.workspace }}/public/content/**/optimized
${{ github.workspace }}/public/content/images.sha256.json
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }} key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}
- name: Install Dependencies
run: yarn install - name: Install Rust Toolchain
- name: Build the Website uses: dtolnay/rust-toolchain@stable
run: yarn build with:
- name: Export the Website targets: wasm32-unknown-unknown
run: yarn export
- name: Install Trunk
uses: jetli/trunk-action@v0.4.0
with:
version: "v0.17.5"
- name: Build Hydrating Application
run: trunk build --release --features hydration
- name: Perform Site Generation
run: cargo run --release --features static --bin site-build
- name: Synchronize with S3 Bucket - name: Synchronize with S3 Bucket
uses: jakejarvis/s3-sync-action@v0.5.1 uses: jakejarvis/s3-sync-action@v0.5.1
with: with:
@ -41,7 +52,8 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "eu-west-1" AWS_REGION: "eu-west-1"
SOURCE_DIR: "out" SOURCE_DIR: "output"
- name: Create CloudFront Invalidation - name: Create CloudFront Invalidation
uses: awact/cloudfront-action@master uses: awact/cloudfront-action@master
env: env: