Skip to content

Add favicon

Add favicon #1

Workflow file for this run

# For setup instructions needed for Fermyon Cloud, see:
# https://developer.fermyon.com/cloud/github-actions
# For reference, see:
# https://developer.fermyon.com/cloud/changelog/gh-actions-spin-deploy
# For the Fermyon gh actions themselves, see:
# https://github.com/fermyon/actions
name: Preview on Spin Cloud
on:
pull_request:
branches: [main]
types: [opened, synchronize, reopened, closed]
workflow_dispatch:
permissions:
contents: read
pull-requests: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "spin"
cancel-in-progress: false
env:
GH_API_PAT: ${{ secrets.GH_API_PAT }}
jobs:
Spin-Preview:
timeout-minutes: 10
environment:
name: preview
url: ${{ steps.preview.outputs.app-url }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4 # repo checkout
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin
~/.cargo/git
~/.cargo/registry
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# Install Rust Toolchain, with Clippy & Rustfmt
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
components: clippy, rustfmt
- name: Add WASM & WASI targets
run: rustup target add wasm32-unknown-unknown && rustup target add wasm32-wasi
- name: lint
run: cargo clippy & cargo fmt
- name: Download and install tailwindcss binary
run: npm install -g tailwindcss
- name: Download and install Trunk binary
uses: jetli/[email protected]
with:
version: latest
- name: Build with Trunk
run: trunk build --release --minify --public-url https://raw.githubusercontent.com/SpacewaIker/spacewaiker.github.io/main/
# Install Spin CLI & Deploy
- name: Setup Spin
uses: fermyon/actions/spin/setup@v1
# with:
# plugins:
- name: Build and preview
id: preview
uses: fermyon/actions/spin/preview@v1
with:
fermyon_token: ${{ secrets.FERMYON_CLOUD_TOKEN }}
github_token: ${{ secrets.GH_PREVIEW_PAT }}
undeploy: ${{ github.event.pull_request && github.event.action == "closed" }}

Check failure on line 91 in .github/workflows/spin_preview.yml

View workflow run for this annotation

GitHub Actions / Preview on Spin Cloud

Invalid workflow file

The workflow is not valid. .github/workflows/spin_preview.yml (Line: 91, Col: 21): Unexpected symbol: '"closed"'. Located at position 53 within expression: github.event.pull_request && github.event.action == "closed"
# key_values: |-
# abc=xyz
# foo=bar
# variables: |-
# password=${{ secrets.SECURE_PASSWORD }}
# apikey=${{ secrets.API_KEY }}
# Create an explicit message to display the URL of the deployed app, as well as in the job graph
- name: Preview URL
run: |
echo "Preview app URL: ${{ steps.preview.outputs.app-url }}" >> $GITHUB_STEP_SUMMARY