Switch over to WebAssembly, Rust and Yew #35
32
.github/workflows/deploy.yaml
vendored
32
.github/workflows/deploy.yaml
vendored
@ -14,24 +14,35 @@ jobs:
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Setup Node
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: 16
|
||||
node-version: 18
|
||||
|
||||
- name: Configure Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
${{ github.workspace }}/node_modules
|
||||
${{ github.workspace }}/public/content/**/optimized
|
||||
${{ github.workspace }}/public/content/images.sha256.json
|
||||
key: ${{ runner.os }}-nextjs-${{ hashFiles('**/yarn.lock') }}
|
||||
- name: Install Dependencies
|
||||
run: yarn install
|
||||
- name: Build the Website
|
||||
run: yarn build
|
||||
- name: Export the Website
|
||||
run: yarn export
|
||||
|
||||
- name: Install Rust Toolchain
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
targets: wasm32-unknown-unknown
|
||||
|
||||
- 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
|
||||
uses: jakejarvis/s3-sync-action@v0.5.1
|
||||
with:
|
||||
@ -41,7 +52,8 @@ jobs:
|
||||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
|
||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||
AWS_REGION: "eu-west-1"
|
||||
SOURCE_DIR: "out"
|
||||
SOURCE_DIR: "output"
|
||||
|
||||
- name: Create CloudFront Invalidation
|
||||
uses: awact/cloudfront-action@master
|
||||
env:
|
||||
|
Loading…
Reference in New Issue
Block a user